diff --git a/examples/pubsubtest/main.js b/examples/pubsubtest/main.js index fc8f7214f..df2fe2b6d 100644 --- a/examples/pubsubtest/main.js +++ b/examples/pubsubtest/main.js @@ -82,7 +82,7 @@ clientLocal.ontrack = (track, stream) => { // If the stream is not there in the streams map. if (!streams[stream.id]) { // Create a video element for rendering the stream - remoteVideo = document.createElement("video"); + const remoteVideo = document.createElement("video"); remoteVideo.srcObject = stream; remoteVideo.autoplay = true; remoteVideo.muted = remoteVideoIsMuted;