Video will not autoplay if you do not enable your camera; add button to toggle
Signed-off-by: James Ketrenos <james_eikona@ketrenos.com>
This commit is contained in:
parent
14115400a3
commit
49d633a7c2
@ -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)`;
|
||||
}}
|
||||
/><Video className="Video"
|
||||
data-id={media.name}
|
||||
autoPlay='autoplay'
|
||||
{...media.attributes}/>
|
||||
</> }
|
||||
|
Loading…
x
Reference in New Issue
Block a user