在 Google chrome 浏览器中,当我更改为鼠标移动时显示的全屏 mod 标准控件时。也总是在右键菜单上启用功能显示控制(仅在全屏上),我无法禁用它。所以我托盘这个js功能,但他们不工作。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>
我将 src 课程更改了很长时间,但视频来自另一个域。