1个回答
展开全部
全屏代码没有在,你的只是播放而已
要全屏F11即可,
全屏代码存在兼容性问题,你的这个浏览器应该可以
Option.prototype.toggleFullscreen = function() {
if ((document.fullScreenElement && document.fullScreenElement !== null) ||
(!document.mozFullScreen && !document.webkitIsFullScreen)) {
this.enterFullscreen(document.documentElement);
} else {
this.cancelFullscreen();
}
};
Option.prototype.enterFullscreen = function(docElm) {
if (docElm.requestFullscreen) {
docElm.requestFullscreen();
}
else if (docElm.mozRequestFullScreen) {
docElm.mozRequestFullScreen();
}
else if (docElm.webkitRequestFullScreen) {
docElm.webkitRequestFullScreen();
}
};
Option.prototype.cancelFullscreen = function(){
if (document.exitFullscreen) {
document.exitFullscreen();
}
else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
}
else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
}
};
要全屏F11即可,
全屏代码存在兼容性问题,你的这个浏览器应该可以
Option.prototype.toggleFullscreen = function() {
if ((document.fullScreenElement && document.fullScreenElement !== null) ||
(!document.mozFullScreen && !document.webkitIsFullScreen)) {
this.enterFullscreen(document.documentElement);
} else {
this.cancelFullscreen();
}
};
Option.prototype.enterFullscreen = function(docElm) {
if (docElm.requestFullscreen) {
docElm.requestFullscreen();
}
else if (docElm.mozRequestFullScreen) {
docElm.mozRequestFullScreen();
}
else if (docElm.webkitRequestFullScreen) {
docElm.webkitRequestFullScreen();
}
};
Option.prototype.cancelFullscreen = function(){
if (document.exitFullscreen) {
document.exitFullscreen();
}
else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
}
else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
}
};
追问
我只是想要视频覆盖整个页面……我的代码哪里出问题了?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询