Closed martiankoder closed 10 months ago
Assuming you are using OvenPlayer with OvenMediaEngine, I suggest using the REST API to check if the stream is live before reloading the player. There are also 'bigPlayButton' and 'autoplay' instantiation options for OvenPlayer if you want to change the way the player looks when it appears.
Thank you for your reply, The autoPlay is actually autoStart, as stated in the issue #132 by the poster of this issue, autoStart did not help, that's why it was given the solution in the code above. But the code causes flickering. I am not aware of the REST API, can you show it to me, I can't find it. Thank you.
I don't see where indicates that the stream is ready, even if the stream is ready on the input side, the viewers' ovenplayer might have not received the stream yet, or it is not receiving enough data to load and play on the OvenPlayer. Can you give me an example on the client side and server side, how to can get a property or variable indicating the stream is ready to load? Thank you
I periodically send a GET to OME/v1/vhosts/{vhost}/apps/{app}/streams/{stream} which returns 404 if the stream is not live. If you get a 200, the stream is live and you can then call player.load() or player.create()
Thanks for many help bchah!
We are closing the issue due to a long period of inactivity. If further discussion is needed, please reopen the issue.
Hi everyone,
I just followed the code on this post (issue) #132 The solution given in the post helped refresh but the player just flickers. I tried to set the interval to 5 seconds, but it does not help much. It just delays the transition from the text error "Connection with low latency (OME) server failed" to an image of circular play button. It just repeats the transition. This might cause a headache to users. ;) Very annoying. The solution causes a bad problem.
Do you know how to fix it ? Thanks.
The solution given in the post above was: `var ovenPlayer = null;
function loadOvenPlayer () {
}
loadOvenPlayer();`