我在视频开始和完成时触发视频开始和结束事件。它工作正常,直到我更新到三星Galaxy S5上的OS版本6.0.2。 即使在Iphone浏览器上,它在chrome,firefox上运行良好,但在Android本机浏览器上却没有。
代码:
$(document.getElementById('movie')).on('fullscreenchange webkitfullscreenchange webkitbeginfullscreen webkitendfullscreen', (
function (e) {
$(document).off('fullscreenchange mozfullscreenchange MSFullscreenChange');
$scope.onFullScreenChange(e.type);
}));
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
} else if (videoElement.exitFullscreen) {
videoElement.exitFullscreen();
} else if (videoElement.webkitExitFullscreen) {
videoElement.webkitExitFullScreen();
} else if (document.cancelFullScreen) {
document.cancelFullScreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
}