First of all, thank you for all the tutorials and this great forum!
It helped me a lot get the basics of FMS!
So, I am building an app that users can publish live streams from FMLE or whatever encoder they use.
The streams will originate mostly from a non-flash encoder (FMLE, Xsplit, Wirecast, etc) so I cannot do anything on the client-side.
I am now trying to make it so that when no stream is published, the server will serve a file from the disk in a loop and when a publisher connects and starts streaming it will switch to the live stream.
Similarly when the publisher stops streaming, I want to switch back to the loop file stream.
The whole concept is, that whether a publisher is streaming or not, the viewers will always 'see' something and most of all they don't get disconnected when the stream stops (as it happens by default when the publisher stops streaming).
I've managed to create a recursive function that will stream a video file from the disk over and over.
But I cannot find anything in the documentation that will allow me to switch streams server-side without waiting for the previous Stream.play() to finish.
Is there a workaround or any ideas how to implement this functionality on FMS?