-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
482c27c
commit 60abe96
Showing
1 changed file
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,11 @@ | |
<title>Viewer</title> | ||
</head> | ||
<body> | ||
<iframe id="viewport_iframe" style="border:0;padding:0;margin:0 auto;max-width:100%;height:100%;max-height:100%;"></iframe> | ||
<div id="viewport_div"> | ||
<iframe class="viewport_iframes" style="visibility: visible;"></iframe> | ||
<iframe class="viewport_iframes" style="visibility: hidden;"></iframe> | ||
<iframe class="viewport_iframes" style="visibility: hidden;"></iframe> | ||
</div> | ||
<style> | ||
#mess-messElement { | ||
white-space: preserve; | ||
|
@@ -19,6 +23,25 @@ | |
width: 100%; | ||
height: auto; | ||
} | ||
.viewport_div{ | ||
posiiton:relative; | ||
border:0; | ||
padding:0; | ||
margin:0 auto; | ||
max-width:100%; | ||
height:100%; | ||
max-height:100%; | ||
} | ||
.viewport_iframes{ | ||
position:absolute; | ||
top:0;left:0; | ||
border:0; | ||
padding:0; | ||
margin:0; | ||
max-width:100%; | ||
height:100%; | ||
max-height:100%; | ||
} | ||
html, body { | ||
text-align:center; | ||
border:0; | ||
|
@@ -35,7 +58,9 @@ | |
<script src="https://unpkg.com/[email protected]/dist/peerjs.min.js"></script> | ||
<script type="text/javascript"> | ||
(function () { | ||
let iframe = document.getElementById('viewport_iframe') | ||
let div = document.getElementById('viewport_div') | ||
var iframes = div.getElementsByTagName("iframe"); | ||
let iframe = frames[0] | ||
var lastPeerId = null; | ||
var peer = null; // Own peer object | ||
var peerId = null; | ||
|