Skip to main content
Participant
October 1, 2009
Question

How to loop a server-side playlist

  • October 1, 2009
  • 1 reply
  • 778 views

Hello,

i have a problem with my server-side playlist. I have three incoming live-streams from the FME:

/*

clientStream = Stream.get("New_Stream");

clientStream.play("live1", -1, 10, false);

clientStream.play("live2", -1, 10, false);

clientStream.play("live3", -1, 10, false);

*/

I want that every stream is changed every 10 seconds and that the complete playlist starts again after

the last stream was played.

So far it works but only for three times. Then the messages "NetStream.Play.Stop" occurs.

Thanks a lot for any solutions.

    This topic has been closed for replies.

    1 reply

    Adobe Employee
    June 21, 2010

    var clientStream;
    var id1, id2;

    application.onConnect = function(client)
    {
    trace("Client Connected...");
    this.acceptConnection(client);

    clientStream = Stream.get("New_Stream");
    clientStream.setBufferTime(10);

    clientStream.play("live1", -1, 10, false);

    id1 = setInterval(p1, 10000);
    }

    function p1(){
    clearInterval(id1);
    clientStream.play("live2", -1, 10, false);
    id2 = setInterval(p2, 10000);
    }

    function p2(){
    clearInterval(id2);
    clientStream.play("live3", -1, 10, false);
    id1 = setInterval(p1, 10000);
    }

    Regards,

    Amit