This commit is contained in:
Sergiu Toma 2022-12-19 13:57:17 +02:00
parent 88da70731f
commit b4fccc4d4c
3 changed files with 17 additions and 7 deletions

View File

@ -20822,9 +20822,11 @@ const connectRecvTransport = async () => {
console.log('stream', stream); console.log('stream', stream);
// let removeAudio = document.getElementById('remoteAudio')
// removeAudio.srcObject = stream
remoteVideo.srcObject = stream remoteVideo.srcObject = stream
remoteVideo.setAttribute('autoplay', true) remoteVideo.setAttribute('autoplay', true)
remoteVideo.setAttribute('muted', false)
remoteVideo.play() remoteVideo.play()
.then(() => { .then(() => {

View File

@ -48,23 +48,29 @@
<div id="sharedBtns"> <div id="sharedBtns">
<video <video
id="localVideo" id="localVideo"
autoplay
class="video" class="video"
autoplay
muted muted
controls
playsinline playsinline
></video> ></video>
</div> </div>
</td> </td>
<td> <td>
<div id="sharedBtns"> <div id="sharedBtns">
<video <!-- <video
id="remoteVideo" id="remoteVideo"
autoplay
class="video" class="video"
autoplay
muted muted
playsinline playsinline
></video> ></video> -->
<audio
id="remoteVideo"
autoplay
muted
playsinline
src="data:," alt
></audio>
</div> </div>
</td> </td>
</tr> </tr>

View File

@ -464,9 +464,11 @@ const connectRecvTransport = async () => {
console.log('stream', stream); console.log('stream', stream);
// let removeAudio = document.getElementById('remoteAudio')
// removeAudio.srcObject = stream
remoteVideo.srcObject = stream remoteVideo.srcObject = stream
remoteVideo.setAttribute('autoplay', true) remoteVideo.setAttribute('autoplay', true)
remoteVideo.setAttribute('muted', false)
remoteVideo.play() remoteVideo.play()
.then(() => { .then(() => {