Copy link to clipboard
Copied
What I'm looking to do is have a flash player that constantly plays a loop of videos, but it automatically switches to our live stream whenever we start the encoder. Is this possible, and if it is...how can I do this?
Thanks in advance for your help!
Copy link to clipboard
Copied
Yes , it can .
You should get the help from SSL Document.
The play method of stream has many parameter , if you use it like this stream.play(stream_name) , it will play your live stream ,not your video files .
Copy link to clipboard
Copied
What you can do is as follows:
Start playing videos on demand placed at FMS side using client-side playlist. Also have one handler defined at client-end which will get invoked by server-side code.
Once you encoder starts publishing, application.onPublish will get triggered on server-side application code. In application.onPublish, we can call client-side handler(as i said above) which will basically notify client that live publish has started. Once we know that on client side we can stop the VOD Client-side play and issue new play for live stream. You can read client-side documentation regarding NetStream.play