Skip to main content
May 7, 2012
Answered

How to change play video immediately ?

  • May 7, 2012
  • 1 reply
  • 2442 views

Hi

I'm using  Stream Class on Server side to play video.

It look like:  myStream.play("sample", 0, -1, true);

When server play streaming and publishing my "sample" file, maybe I need using another app call this app, stop playing and play other video ? And end-user view my streaming no interruptions when switch between 2 file video.

How can I do that ?

Mai Huy

    This topic has been closed for replies.
    Correct answer SE_0208

    I am not sure if i got your use case clearly but let me try to answer it. I think you just need to very simple thing.

    Whenever you want to change the video , call server-side function (either by some timer or some other server-side app or some other flash client) which in turn would make another play call.

    Example

    function changeVideo(){

    mystream.play("newvideo",0,-1,true);

    }

    You can chose last parameter to be "true" if you want new file to be played immediately or "false" if you want first file to be played fully and then second file playback.

    Your client would subscribe to stream by name which was used in Stream.get() when mystream was created.

    Let me know if you want me to elaborate more.

    1 reply

    SE_0208Correct answer
    Adobe Employee
    May 8, 2012

    I am not sure if i got your use case clearly but let me try to answer it. I think you just need to very simple thing.

    Whenever you want to change the video , call server-side function (either by some timer or some other server-side app or some other flash client) which in turn would make another play call.

    Example

    function changeVideo(){

    mystream.play("newvideo",0,-1,true);

    }

    You can chose last parameter to be "true" if you want new file to be played immediately or "false" if you want first file to be played fully and then second file playback.

    Your client would subscribe to stream by name which was used in Stream.get() when mystream was created.

    Let me know if you want me to elaborate more.

    May 8, 2012

    Yes, that's correct. Thanks your help

    Adobe Employee
    May 12, 2012

    Always welcome