Skip to main content
Known Participant
January 10, 2013
Answered

How to repeat a serverside playlist after last video without reload application

  • January 10, 2013
  • 1 reply
  • 570 views

Hello!

This is my server side playlist application:

application.onAppStart = function(){

  this.myStream = Stream.get("serverplaylist");

  this.myStream.record();    

  this.myStream.play("two-01-02",0,-1,true );

  this.myStream.play("two-01-02", 0, -1, false);

  this.myStream.play("two-01-01",0,-1,false );

}

After last movie plays, I need to reload the application and it starts again.

I would like to ask, how to repeat the server side playlist, without reload the application. A real continuos play.

Thanks,
Rafael    

This topic has been closed for replies.
Correct answer SE_0208

Change your above code based on below lines (below is my code - showing how to repeat playlist, dont use my code directly - modify your code accordingly)

application.onAppStart = function(){

          ms = Stream.get("playlist");

          ms.onStatus = function(info){

                    trace("Ns status:"+info.code);

                    if(info.code == "NetStream.Play.Stop"){

                              trace("came here");

                              ms.play("sample",0,-1,false);

                              ms.play("mp4:sample1_150kbps.f4v",0,-1,false);

 

                    }

          }

          ms.play("sample",0,-1,true);

          ms.play("mp4:sample1_150kbps.f4v",0,-1,false);

}

1 reply

SE_0208Correct answer
Adobe Employee
January 11, 2013

Change your above code based on below lines (below is my code - showing how to repeat playlist, dont use my code directly - modify your code accordingly)

application.onAppStart = function(){

          ms = Stream.get("playlist");

          ms.onStatus = function(info){

                    trace("Ns status:"+info.code);

                    if(info.code == "NetStream.Play.Stop"){

                              trace("came here");

                              ms.play("sample",0,-1,false);

                              ms.play("mp4:sample1_150kbps.f4v",0,-1,false);

 

                    }

          }

          ms.play("sample",0,-1,true);

          ms.play("mp4:sample1_150kbps.f4v",0,-1,false);

}