video.js inside a modal window: full screen not working

本秂侑毒 提交于 2019-12-04 06:25:56

问题


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.


回答1:


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">


来源:https://stackoverflow.com/questions/14319531/video-js-inside-a-modal-window-full-screen-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!