Browse Source

Adds unload link to example page

dev1
hristoterezov 9 years ago
parent
commit
7cb1484add
2 changed files with 4 additions and 1 deletions
  1. 3
    1
      doc/example/example.js
  2. 1
    0
      doc/example/index.html

+ 3
- 1
doc/example/example.js View File

139
 }
139
 }
140
 
140
 
141
 function unload() {
141
 function unload() {
142
-   room.leave();
142
+    for(var i = 0; i < localTracks.length; i++)
143
+        localTracks[i].stop();
144
+    room.leave();
143
     connection.disconnect();
145
     connection.disconnect();
144
 }
146
 }
145
 
147
 

+ 1
- 0
doc/example/index.html View File

11
     <script src="example.js" ></script>
11
     <script src="example.js" ></script>
12
 </head>
12
 </head>
13
 <body>
13
 <body>
14
+    <a href="#" onclick="unload()">Unload</a>
14
     <!-- <video id="localVideo" autoplay="true"></video> -->
15
     <!-- <video id="localVideo" autoplay="true"></video> -->
15
     <!--<audio id="localAudio" autoplay="true" muted="true"></audio>-->
16
     <!--<audio id="localAudio" autoplay="true" muted="true"></audio>-->
16
 </body>
17
 </body>

Loading…
Cancel
Save