Javascript 允许在innerhtml/iframe中全屏显示
我试图让用户能够在全屏模式下观看视频。该视频使用iframe嵌入stream.php内的streamvideo.php中 我发现iframe不允许内容全屏显示,除非我们调用allowfullscreen 当用户登录到我的网站index.php使用内部html加载Stream.php并在Stream.php中加载各种iframe Index.phpJavascript 允许在innerhtml/iframe中全屏显示,javascript,php,html,iframe,Javascript,Php,Html,Iframe,我试图让用户能够在全屏模式下观看视频。该视频使用iframe嵌入stream.php内的streamvideo.php中 我发现iframe不允许内容全屏显示,除非我们调用allowfullscreen 当用户登录到我的网站index.php使用内部html加载Stream.php并在Stream.php中加载各种iframe Index.php <li id="onlineslides"><a href="#onlineslides" onclick="load_home
<li id="onlineslides"><a href="#onlineslides" onclick="load_home2();">OnlineSlides</a></li>
function load_home2(){
document.getElementById("content").innerHTML='<object style="width: 100%; height: 100%; overflow:auto" type="text/html" data="stream/stream.php" ></object>';
}
函数加载_home2(){
document.getElementById(“内容”).innerHTML='';
}
Stream.php
<iframe src="video/streamvideo.php" id="streamvideoiFrame" frameborder="0" width="800" height="1000" allowfullscreen="" webkitallowfullscreen=""> ></iframe>
>
当我直接访问stream.php时,我可以全屏观看视频。但是,当我使用index.php访问链接时,我无法全屏加载视频。我如何解决这个问题?有人有什么建议吗?