user2633669
user2633669

Reputation: 285

HTML5 video does not hide controls in fullscreen mode in Chrome

In Google chrome browser when I change to full screen mod standard controls showing when mouse move. Also always enabled function show control on right click menu (only on full screen), I can't disabled it. So I tray this js functions but they not working. JS:

$('.gp_nav_fc').click(function() {
    elem = $('#bcVideo')[0];
    if (elem.requestFullscreen) {
        elem.requestFullscreen();
    } else if (elem.mozRequestFullScreen) {
        elem.mozRequestFullScreen();
    } else if (elem.webkitRequestFullscreen) {
         elem.webkitRequestFullscreen();
    }
    $('.gp_buttons').attr('class', 'gp_buttons fullscreen');
        elem.controls = false;
        $('#bcVideo')[0].removeAttribute("controls");
        $('#bcVideo').controls = false;
});

HTML:

<video id="bcVideo" src="anotherhost.com/video.mp4" style="position: absolute;" poster="poster.gif"></video>

I change src course it very long, but video getting from another domain.

Upvotes: 8

Views: 9991

Answers (1)

user2633669
user2633669

Reputation: 285

So I find answer for this question.

In css need to add next rule:

video::-webkit-media-controls {
  display:none !important;
}

more information on link: http://css-tricks.com/custom-controls-in-html5-video-full-screen/

Upvotes: 20

Related Questions