1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-22 16:45:58 +01:00

Minor fixes to example.

This commit is contained in:
Juliusz Chroboczek 2024-06-08 18:30:14 +02:00
parent ac47a82e2f
commit 45ae8c5339

View file

@ -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) {
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;
} }