更新Android OS版本6.0.2后,事件未触发

时间:2016-06-28 08:44:17

标签: javascript android jquery

我在视频开始和完成时触发视频开始和结束事件。它工作正常,直到我更新到三星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();
   }

0 个答案:

没有答案