My problem is that I want to play a recorded video in a VideoDisplay Component on client side which is kept in C:\Program Files\Adobe\Flash Media Server 3\applications\VideoStream folder on the server side. btw VideoStream is my created aplication.
I’m able to connect to server successfully and open a stream from there so that I can read the flv but during coding I could not find any property/method that could correlate my NetConnection and NetStream Object with VideoDisplay Object.
Please tell me how to go about it? Which property should I use to tell my VideoDisplay Object to read the stream? Do I need to add something to main.asc file in C:\Program Files\Adobe\Flash Media Server 3\applications\VideoStream?
My bit of code is,
<mx:Script>
<![CDATA[
import flash.net.NetStream;
import flash.net.NetConnection;
import flash.events.NetStatusEvent;
public var netConn:NetConnection = new NetConnection();
public function init() : void
{
netConn.addEventListener(NetStatusEvent.NET_STATUS , netStatus);
netConn.client = this;
netConn.connect("rtmp://MyServerURL/VideoStream");
}
public function netStatus(event:NetStatusEvent) : void
{
var info:Object = event.info;
trace(info.code);
switch(info.code)
{
case "NetConnection.Connect.Success":
var ns:NetStream = new NetStream(netConn);
//I should be able to give source through NetConnection/NetStream Object or play //Replay_video by using them. Simply assigning following URL does not work
Replay_video.source = "rtmp://MyServerURL/VideoStream/my_recorded_stream.flv";
break;
case "NetConnection.Connect.Closed":
break;
}
}
]]>
</mx:Script>
<mx:VideoDisplay x="27" y="36" width="269" height="194" id="Replay_video" autoBandWidthDetection="false" />
I know that I can do this very simply by keeping the video file in vod folder on the server but my app requires that I need to play it from my created Application folder on FMS
Please help…