View Full Version : Simulated Live on FMS with OD File
so_and_so
10-23-2007, 04:37 PM
Hi Guys and Gals,
Is it possible with FMS to simulate a live stream using an OD file. i.e. Can you start an OD file streaming at a specific point (say 10am), then when someone tries to connect to it (say 10:20am), it plays as if they missed the first 20 minutes. An ideal situation would be without using the FM Encoder and not passing in parameters to the file. tia, T
so_and_so
11-14-2007, 10:07 PM
This is possible, according to Kevin at the Adobe forums:
"Create a server-side stream, and play() the recorded stream. The stream will play normally, even if no client is subscribed to the stream. When a client does subscribe, playback will start at whatever position the recorded stream happens to be at.
You can actually play multiple files in sequence, so that when one recording ends the next one will begin. This is called a "server-side playlist"."
However, I am unable to correctly set this up. I have tried a few different things, looked through the documentation, and still can't quite get it. Can anyone point me to a relevant tutorial or post some code? Any help would be greatly appreciated.
Thanks, T
so_and_so
11-15-2007, 03:18 PM
Brilliant, after much searching, I found the right combo...
Serverside in main.asc under app folder:
application.onAppStart = function()
{
application.playStream = Stream.get("simlivestream");
if(application.playStream)
{
application.playStream.play("simlive", -2); //name of flv to play
}
}
On client side:
var nc:NetConnection = new NetConnection();
nc.connect("rtmp://flashmediaserver/appname");
var ns:NetStream = new NetStream(nc);
ns.play("simlivestream");
vPlayer.attachVideo(ns);
This was the resource: http://www.adobe.com/devnet/flashmediaserver/articles/learning_fms2_excerpt/learning_fms2_ch09.pdf
Enjoy!
T
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.