2

我正在努力以全屏模式播放视频。所有浏览器都可以正常工作,包括 safari。但 ipad/iphone 完全没有响应。这是我的状况和功能,有人可以帮我解决这个问题吗?

代码:

if(fullscreen && !currentVideo.paused){
            if (currentVideo.requestFullScreen) {
                currentVideo.requestFullScreen();
              } else if (currentVideo.mozRequestFullScreen) {
                currentVideo.mozRequestFullScreen();
              } else if (currentVideo.webkitRequestFullScreen || currentVideo.webkitEnterFullscreen) {
                currentVideo.webkitRequestFullScreen() || currentVideo.webkitEnterFullscreen();
            }
        }
4

1 回答 1

1

这对我来说是工作......

setTimeout(function () {
        if(fullscreen && !currentVideo.paused){
            if (currentVideo.requestFullScreen) {
                currentVideo.requestFullScreen();
              } else if (currentVideo.mozRequestFullScreen) {
                currentVideo.mozRequestFullScreen();
              } else if (currentVideo.webkitRequestFullScreen) {
                currentVideo.webkitRequestFullScreen();
             } else if (currentVideo.webkitEnterFullscreen){
                currentVideo.webkitEnterFullscreen();
             }
        }
    },1000);        
} );

谢谢大家。

于 2012-10-23T10:54:17.443 回答