Ensure video element mirroring is removed

When reusing a video element between a local stream with mirroring, and a remote stream with no mirroring, the element's mirror transform was not getting removed.
pull/689/head
Flamenco 2022-01-25 14:11:31 -05:00 committed by GitHub
parent 3c1876769b
commit 39c9cec7d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -414,7 +414,12 @@ export class StreamManager extends EventDispatcher {
}
}
if (!this.remote && !this.stream.displayMyRemote()) {
if (this.remote) {
// Do not mirror remote video.
// Remove the mirror if this video was currently associated with a local mirrored video.
this.removeMirrorVideo(video);
}
else if (!this.stream.displayMyRemote()) {
video.muted = true;
if (video.style.transform === 'rotateY(180deg)' && !this.stream.outboundStreamOpts.publisherProperties.mirror) {
// If the video was already rotated and now is set to not mirror
@ -567,4 +572,4 @@ export class StreamManager extends EventDispatcher {
delete this.streamPlayingEventExceptionTimeout;
}
}
}