ipad / iphone视频无法切换到全屏模式

时间:2012-10-23 10:09:47

标签: jquery iphone ipad event-handling html5-video

我正在使用全屏模式制作视频。所有浏览器都在运行,包括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();
            }
        }

1 个答案:

答案 0 :(得分: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);        
} );

感谢所有人。