Callback for on autostart not allowed
Hi there
There are more and more browsers which doesn't allow autostart. Is there something to check, if autostart is allowed or not? Lika a "onAutostartDisallowed" callback?
My current workaround is to check the players state on ready (for example, Chrome on Android doesn't fire any requests at all in the first place) ...
// on('ready')
window.setTimeout(function() {
if (jwplayer('id').getState() === 'idle') {
// Do something smart here
}
}, 0);
... and onAdImpression (for example, Safari 11 requesting the ad before pausing the autostarted stream)
// on('adImpression')
window.setTimeout(function() {
if (jwplayer('id').getState() !== 'playing') {
// do something smart here
}
}, 0);
Is there a better, cleaner way to do this? Or is there even a feature planed?
Thank you.
Cheers, Marc