As module.
parent
d0bd78850e
commit
7bd1bf148b
|
|
@ -2,7 +2,7 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<script src="https://webrtc.github.io/adapter/adapter-latest.js"></script>
|
<script src="https://webrtc.github.io/adapter/adapter-latest.js"></script>
|
||||||
<script src="webrtc.js"></script>
|
<script type="module" src="webrtc.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
@ -11,10 +11,6 @@
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<input type="button" id="start" onclick="start(true)" value="Start Video"></input>
|
<button id="start">Start Video</button>
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
pageReady();
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,9 @@ var peerConnectionConfig = {
|
||||||
};
|
};
|
||||||
|
|
||||||
function pageReady() {
|
function pageReady() {
|
||||||
|
document.querySelector("button#start")
|
||||||
|
.addEventListener("click", start);
|
||||||
|
|
||||||
uuid = createUUID();
|
uuid = createUUID();
|
||||||
|
|
||||||
localVideo = document.getElementById('localVideo');
|
localVideo = document.getElementById('localVideo');
|
||||||
|
|
@ -129,3 +132,5 @@ function createUUID() {
|
||||||
|
|
||||||
return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
|
return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pageReady();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue