Copy link to clipboard
Copied
I need to stream a flv video from https web server to flash GUI.
I am using NetConnect, NetStream and Video objects. But when I try to stream the video it gives errors:
'Error opening URL" and "Stream not found".
This problem is not seen if I try to access video from action script if the URL is of a http web server.
I am NOT using flash streaming server or flash media server. I am using Action Script 3.0
The same URL is showing the video file contents if I directly access it from web browser from the same machine.
Can you please let me know if flash video is supported from a https web server? Are there any alternatives or options or properties available to make this work?
Thanks,
Gulshan
Copy link to clipboard
Copied
If you are working on progressive video use Netconnection to null and use Netstream.play("path/yourFile.flv")
Copy link to clipboard
Copied
I have done that. I am using the sample code from:
The code is as below:
package {
import flash.display.Sprite;
import flash.events.NetStatusEvent;
import flash.events.SecurityErrorEvent;
import flash.media.Video;
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.events.Event;
public class NetConnectionExample extends Sprite {
//private var videoURL:String = "http://www.helpexamples.com/flash/video/cuepoints.flv";
private var videoURL:String = "https://<IPadress>/<filename>.flv";
private var connection:NetConnection;
private var stream:NetStream;
private var video:Video = new Video();
public function NetConnectionExample() {
connection = new NetConnection();
connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
connection.connect(null);
}
private function netStatusHandler(event:NetStatusEvent):void {
switch (event.info.code) {
case "NetConnection.Connect.Success":
connectStream();
break;
case "NetStream.Play.StreamNotFound":
trace("Stream not found: " + videoURL);
break;
}
}
private function securityErrorHandler(event:SecurityErrorEvent):void {
trace("securityErrorHandler: " + event);
}
private function connectStream():void {
var stream:NetStream = new NetStream(connection);
stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
stream.client = new CustomClient();
video.attachNetStream(stream);
stream.play(videoURL);
addChild(video);
}
}
}
class CustomClient {
public function onMetaData(info:Object):void {
trace("metadata: duration=" + info.duration + " width=" + info.width + " height=" + info.height + " framerate=" + info.framerate);
}
public function onCuePoint(info:Object):void {
trace("cuepoint: time=" + info.time + " name=" + info.name + " type=" + info.type);
}
}
Copy link to clipboard
Copied
so what error you are getting
Copy link to clipboard
Copied
'Error opening URL" and "Stream not found"
Copy link to clipboard
Copied
From where you are testing?
Copy link to clipboard
Copied
I am testing from the machine where I have developed flash UI. The scenario is as below:
M/c 1 fla file ----------> M/c2 SSL web server (https)
In this scenario it fails.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more