diff --git a/app/common.js b/app/common.js index 720b4f3..b01dd7c 100644 --- a/app/common.js +++ b/app/common.js @@ -60,6 +60,14 @@ function setVideoSource(video, streamOrUrl) { stream = streamOrUrl; whenStreamIsActive(function getStream() { return stream }, setSrc); function setSrc() { + var res = document.querySelector('#res'); + if (res) { + res.innerHTML = '?x?'; + video.oncanplay = function canPlay() { + res.innerHTML = video.videoWidth + 'x' + video.videoHeight; + }; + } + console.log('adding active video stream'); video.style.background = 'black'; try { diff --git a/app/index.html b/app/index.html index feee19a..386cebb 100644 --- a/app/index.html +++ b/app/index.html @@ -11,7 +11,8 @@
Channel: | -+ | + ?x? | |
---|---|---|---|
Channel: | -+ | + ?x? | |
Password: | diff --git a/package.json b/package.json index 5062ca8..8deccec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mediasoup-broadcast-example", - "version": "1.2.0", + "version": "1.2.1", "description": "Sample WebRTC broadcast client/server for the Mediasoup SFU.", "main": "server/index.js", "scripts": {