模态窗口中的video.js:全屏无法正常工作 [英] video.js inside a modal window: full screen not working

查看:181
本文介绍了模态窗口中的video.js:全屏无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用video.js在模态窗口中显示内容,如您所见:

I've been using video.js to show stuff inside a modal windows, as you can see here:

http://www.csdalbenga.it/galleria1.html

通过点击观看视频的即时通讯!"按钮.

by clicking on the "Clicca qui per visionare il video della recita!" button.

这就是问题所在:视频效果很好,但是全屏按钮只会使视频充满模态窗口,因此基本上什么也没有发生,或者视浏览器的不同而略有变化.

So, here's the problem: video works fine, but the full screen button will just make the video fill the modal window, so basically nothing happens or there's a slight size change depending on the browser.

现在我想知道,是否有一种方法可以强制视频全屏显示? 否则,我想我将不得不删除该按钮.

Now I was wondering, is there a way to force the video to full screen? Otherwise I guess I'll have to remove the button.

推荐答案

您的模式将播放器置于iframe中,除非您明确允许,否则浏览器将不允许iframe中的全屏播放.以下内容至少可以在Chrome和Firefox中使用; Internet Explorer根本没有实现允许从iframe进行全屏显示.

Your modal puts the player in an iframe, and the browser will not allow fullscreen from within an iframe unless you specifically allow it. The following will work in Chrome and Firefox at least; Internet Explorer has not implemented allowing fullscreen from an iframe at all.

<iframe … allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true">

这篇关于模态窗口中的video.js:全屏无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆