[英]How to keep the bootstrap popup opened containing HTML5 video on full-screen mode after pressing esc button intended for the video not for the popup?
[英]How to show 2 videos in single HTML5 Full-screen mode
我有2個視頻標簽。 如何顯示包含兩個視頻的單個全屏模式(例如,視頻聊天,我想同時看到自己的相機和朋友的相機)?
我不認為您可以像現在那樣使用全屏模式。
您可以使元素變為全屏顯示,例如包裝兩個視頻的容器 。 在Chrome 15,Firefox 10,Safari 5.1,IE 10中受支持。
您可以在瀏覽器中填充兩個視頻,例如
#video1, #video2 {
width: 50%;
height: 100vh;
float:left;
}
並且在某處有一條小消息,提示“將瀏覽器置於全屏模式以獲得更好的體驗”,或者有一個按鈕可以切換幾乎全屏模式。
<script type="text/javascript">
window.onload = maxWindow;
function maxWindow() {
window.moveTo(0, 0);
if (document.all) {
top.window.resizeTo(screen.availWidth, screen.availHeight);
}
else if (document.layers || document.getElementById) {
if (top.window.outerHeight < screen.availHeight || top.window.outerWidth < screen.availWidth) {
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
}
</script>
從該堆棧溢出答案中獲取的代碼
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.