I'm trying to force exit fullscreen video, when the movie is done. Nothing seems to work for iPad iOS.
video[0].onended = function() {
video[0].pause();
video[0].currentTime = 0;
if ($('body').hasClass('fullscreen_mode')) {
var exitFullScreen = document.exitFullscreen || document.msExitFullscreen || document.mozCancelFullScreen || document.webkitExitFullscreen;
exitFullScreen.call(document);
$('body').removeClass('fullscreen_mode');
}
}
Fullscreen API does not work on iOS. That means the user will have to use the native controls to exit a fullscreen video.
Someone has a more complete reply herE: https://stackoverflow.com/a/50832682/2114953
Also, CanIUse shows the compatibility chart for Fullscreen API and iOS is all red: https://caniuse.com/#feat=fullscreen
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With