i am trying to trigger a video to playback in fullscreen mode when you tap it to start playing it on an Android device (specifically Chrome on a Google Nexus 7) and then close fullscreen mode when the video has ended. I have tried both the webkitRequestFullScreen() and webkitEnterFullScreen() methods. The latter works just fine on iOS but Android 4.2.2 just ignores it totally. I have done a lot of googling on this issue but can't find a definitive answer on it. Anyone know why i can't get fullscreen to fire?
Here is my code:
function movPlaying() {
this.webkitEnterFullScreen();
}
function movEnded() {
this.webkitExitFullScreen();
}
var video_1 = document.getElementById("video_1");
video_1.addEventListener('play', movPlaying);
video_1.addEventListener('ended', movEnded);