Skip to main content
Participant
November 5, 2012
Answered

iOS/HTTP Livestreaming Switch ServerSide Content

  • November 5, 2012
  • 2 replies
  • 815 views

Hi,

can someone give me a hint, how to realize a Livestreaming for iOS Devices with the ability to switch the Content of the Livestream on the fly.

E.g. a player is connection to a Livestream. This Livestream should serve either a Videofile (pre phase) or a Livestream(live phase).

Currently I`m trying to do it with a ServerSide playlist.

application.initStream = function(){

//Create a Livestream and play a File

application.getStream("LiveStream").play("Currently playing Item src",-2,-1, false);

......

//LOOP the playlist item until it gets LIVE

application.getStream("LiveStream").onPlayStatus = function(obj){

if(obj.code == "NetStream.Play.Complete")

        {                

               //When it is getting LIVE, the activePlaylistitem will be e.g. "live"       

                var activePlaylistItem = "VODFILE.f4v" 

                if(activePlaylistItem!=null){                 

                      this.play(activePlaylistItem,-2,-1,false);   

                  }else{

                      trace("ERROR: ---activePlaylistItem is null---");       

                 }

}

}        

....

//Getting a Livestream up to HTTP Delivery

var s = Stream.get("f4f:LiveStream") ;

s.play("LiveStream",-1,-1);

.....

}

So the iOS Device or the HTTP Player should only connect to...

http://localhost/hds-live/ServerSidePlaylist/channel01/Livestream/Livestream.f4m

How did you realize Livewebcast channels and the switching from "Pre" to "Live" to "Ondemand" phases?  

    This topic has been closed for replies.
    Correct answer SE_0208

    It can be achieved the way you are saying - but you need to make sure all the contents are of same encoding settings otherwise pushing all data into same f4f file might lead to stoppages in recording and also its not supported use case. I think better way would be to handle at client end but that would require you to build you own OSMF player which will understand on what basis you will have to switch.

    2 replies

    NeutraloAuthor
    Participant
    November 15, 2012

    Thanks. I`m trying to implement a client site playlist.

    Now I`m struggleing with the end of a livestream....

    Using a "hls-live" link with m3u8 extension within a HTML5 video element. After stoping the Liveencoder I want to receive a stop event in the player! How can I determine a stop of the livestream? So the player jumps to the trailer.

    SE_0208Correct answer
    Adobe Employee
    November 5, 2012

    It can be achieved the way you are saying - but you need to make sure all the contents are of same encoding settings otherwise pushing all data into same f4f file might lead to stoppages in recording and also its not supported use case. I think better way would be to handle at client end but that would require you to build you own OSMF player which will understand on what basis you will have to switch.