diff --git a/client/src/MediaControl.js b/client/src/MediaControl.js index bd73122..b2fd10a 100644 --- a/client/src/MediaControl.js +++ b/client/src/MediaControl.js @@ -604,6 +604,12 @@ const MediaControl = ({isSelf, peer, className}) => { if (debug) console.log(`media-control - toggleVideo - ${peer.name}`, !videoOn); peer.videoOn = !videoOn; + if (peer.videoOn) { + const video = document.querySelector(`video[data-id="${media.name}"`); + if (video) { + video.play(); + } + } setVideoOn(peer.videoOn); event.stopPropagation(); } @@ -693,6 +699,7 @@ const MediaControl = ({isSelf, peer, className}) => { e.target.style.transform = `translate(${translate[0]}px, ${translate[1]}px)`; }} />