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