live streaming from mp4 file
Hello everybody,
I know that's a noob question (as I am) but i can't make it run.
I have an mp4 file and the folders structure is....
Application/test/sources/_definst_
in _definst_ source.mp4
in test folder main.asc file
main.asc file contains
var mystream;
var intervalID;
application.onAppStart = function(){
mystream = Stream.get("mylive");
intervalID = setInterval(startPublish,100); / checking every 100 ms if we can start publish
}
function startPublish(){
if(checkTime() == true){
clearInterval(intervalID ); //clearing the interval so that startPublish won't be called again
myStream.play("mp4:sample.mp4",0,-1,true) //starting the live publish of recorded file sample.mp4
}
}
function checkTime(){
myDate = new Date();
if(myDate.getHours() == 21) // This means its 2 PM
return true;
else
return false;
}
All this stuff doesn't work. When I go to the admin panel and select test under new instance the stream appears on the left side but if press enter on _definst_ it disappears from the column.
What's wrong?
Is possible with this code run that video on ios devices?
Thank you very much
