Вопрос по html, html5 – Есть ли способ сделать HTML5 видео полноэкранным?

139

Error: User Rate Limit Exceeded<video> тег?

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceededblog.jilion.com/2011/07/27/…Error: User Rate Limit Exceededwiki.mozilla.org/Gecko:FullScreenAPI Wouter Dorgelo
Error: User Rate Limit Exceededfindmebyip.com/litmus/#html5-web-applications ghoppe

Ваш Ответ

20   ответов
5

3

Error: User Rate Limit Exceeded

video {
    position: fixed; right: 0; bottom: 0;
    min-width: 100%; min-height: 100%;
    width: auto; height: auto; z-index: -100;
    background: url(polina.jpg) no-repeat;
    background-size: cover;
}
Error: User Rate Limit Exceeded
-1

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded
6

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

1

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded
3

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit Exceeded

Error: User Rate Limit Exceeded
-1

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit Exceeded

1

Error: User Rate Limit Exceeded

    function bindFullscreen(video) {
            $(video).unbind('click').click(toggleFullScreen);
    }

    function toggleFullScreen() {
            if (!document.fullscreenElement &&    // alternative standard method
                    !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement ) {  // current working methods
                    if (document.documentElement.requestFullscreen) {
                            document.documentElement.requestFullscreen();
                    } else if (document.documentElement.msRequestFullscreen) {
                            document.documentElement.msRequestFullscreen();
                    } else if (document.documentElement.mozRequestFullScreen) {
                            document.documentElement.mozRequestFullScreen();
                    } else if (document.documentElement.webkitRequestFullscreen) {
                            document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
                    }
            } 
            else {
                    if (document.exitFullscreen) {
                            document.exitFullscreen();
                    } else if (document.msExitFullscreen) {
                            document.msExitFullscreen();
                    } else if (document.mozCancelFullScreen) {
                            document.mozCancelFullScreen();
                    } else if (document.webkitExitFullscreen) {
                            document.webkitExitFullscreen();
                    }
            }
    }
14
webkitEnterFullScreen();

Error: User Rate Limit Exceeded

document.getElementsByTagName('video')[0].webkitEnterFullscreen();

Notice: this is outdated answer and no longer relevant.

Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
3

Error: User Rate Limit Exceeded

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

31

SafariError: User Rate Limit ExceededwebkitEnterFullscreen.

ChromeError: User Rate Limit Exceeded

Error: User Rate Limit ExceededFirefoxError: User Rate Limit Exceeded

Error: User Rate Limit ExceededOperaError: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded
2

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

-1

Error: User Rate Limit Exceeded<video>Error: User Rate Limit Exceeded

6

Error: User Rate Limit Exceeded

Error: User Rate Limit ExceededrequestFullScreen()Error: User Rate Limit ExceededrequestFullScreen()Error: User Rate Limit ExceededmozRequestFullScreenError: User Rate Limit ExceededwebkitRequestFullscreenError: User Rate Limit Exceeded

var elem = document.getElementById("myvideo");
if (elem.requestFullscreen) {
  elem.requestFullscreen();
} else if (elem.msRequestFullscreen) {
  elem.msRequestFullscreen();
} else if (elem.mozRequestFullScreen) {
  elem.mozRequestFullScreen();
} else if (elem.webkitRequestFullscreen) {
  elem.webkitRequestFullscreen();
}

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit Exceeded

89

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit ExceededrequestFullScreenError: User Rate Limit Exceeded<video>Error: User Rate Limit Exceeded

Error: User Rate Limit ExceededError: User Rate Limit Exceeded.


Error: User Rate Limit Exceeded

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit Exceeded

User agents should not provide a public API to cause videos to be shown full-screen. A script, combined with a carefully crafted video file, could trick the user into thinking a system-modal dialog had been shown, and prompt the user for a password. There is also the danger of "mere" annoyance, with pages launching full-screen videos when links are clicked or pages navigated. Instead, user-agent specific interface features may be provided to easily allow the user to obtain a full-screen playback mode.

Error: User Rate Limit Exceeded


Error: User Rate Limit Exceeded

3

Error: User Rate Limit ExceededError: User Rate Limit Exceeded.

71

Error: User Rate Limit Exceeded

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit Exceededdiv.requestFullScreen()Error: User Rate Limit Exceeded

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

  • Chrome 15+
  • Firefox 10+
  • Safari 5.1+

Error: User Rate Limit ExceededError: User Rate Limit Exceeded.

Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
-1

Error: User Rate Limit Exceeded

  1. Use javascript to set the fullscreen video's 'src' attribute to the smaller videos 'src' attribute
  2. Set the video.currentTime on the fullscreen video to be the same as the small video.
  3. Use css 'display:none' to hide the small video and display the big one with the via 'position:absolute' and 'z-index:1000' or something really high.
3

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded
-1

Error: User Rate Limit Exceeded

Похожие вопросы