From dd1ef9e247967a070f63c8deb1e2e80dafa7b07e Mon Sep 17 00:00:00 2001 From: ilkaya Date: Tue, 16 May 2023 15:50:49 +0300 Subject: [PATCH] Example streaming --- public/index.html | 7 ------- public/index.js | 5 ++--- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/public/index.html b/public/index.html index 8945683..11a8d0b 100644 --- a/public/index.html +++ b/public/index.html @@ -24,13 +24,6 @@ autoplay > -
diff --git a/public/index.js b/public/index.js index c7193a4..5473f91 100644 --- a/public/index.js +++ b/public/index.js @@ -82,7 +82,7 @@ function setPrimaryVideo(video, soundOn) } function setSecondaryVideo(video) { - secondaryVideo.srcObject = video; + // secondaryVideo.srcObject = video; } function templateVideo(name, stream) { @@ -119,8 +119,7 @@ function removeVideoList(name) if(videoContainer.querySelector(`[data-name="${name}"]`)) { let k = videoContainer.querySelector(`[data-name="${name}"]`); - let user = k.dataset.user; - if(k.dataset.user == activeVideo.dataset.user) + if(k.dataset.user == activeVideo?.dataset.user || !activeVideo) { setPrimaryVideo(outgoingStreamOnlyVideo, false); }