iOS/HTTP Livestreaming Switch ServerSide Content
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?
