3

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');
  }
}
user7637745
  • 965
  • 2
  • 14
  • 27
user2587454
  • 903
  • 1
  • 19
  • 44

1 Answers1

0

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

Manuel Cheța
  • 480
  • 2
  • 10