![](https://secure.gravatar.com/avatar/b9c0eb7b4cb9be4609047b7e06be60fa?rating=PG&size=50&default=https%3A%2F%2Fcdn.desk.com%2Fassets%2Funknown_user_50-8ad5644bbe6b1bd7454f2ea465f782bd.png)
how to detect blocked rtmp stream fallback to hls
Hello,
I wish to be able to detect whether rtmp is available and if not fall back to an hls stream. How should I approach this?
Thank you
Hello,
I wish to be able to detect whether rtmp is available and if not fall back to an hls stream. How should I approach this?
Thank you
Hello
You can try using either onSetupError or the onError event handlers to listen for an offline stream and then rebuild the player:
http://support.jwplayer.com/customer/portal/articles/1413089-javascript-api-reference
jwplayer().onSetupError(function() {
jwplayer(‘player’).setup({
file: ‘hls-stream’
});
});
Best Regards,
Cooper