Commit 45ae8c53 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Minor fixes to example.

parent ac47a82e
...@@ -24,8 +24,9 @@ async function start(url) { ...@@ -24,8 +24,9 @@ async function start(url) {
await serverConnect(status, token); await serverConnect(status, token);
} else if(status.authPortal) { } else if(status.authPortal) {
window.location.href = groupStatus.authPortal window.location.href = groupStatus.authPortal
return;
} else { } else {
serverConnect(status, null); await serverConnect(status, null);
} }
} }
...@@ -204,6 +205,7 @@ async function showCamera(conn) { ...@@ -204,6 +205,7 @@ async function showCamera(conn) {
s.label = 'camera'; s.label = 'camera';
s.setStream(ms); s.setStream(ms);
s.onclose = function(replace) { s.onclose = function(replace) {
s.stream.getTracks().forEach(t => t.stop());
v.srcObject = null; v.srcObject = null;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment