From 39c9cec7d100b4a6479fa14e029002b47be227a9 Mon Sep 17 00:00:00 2001 From: Flamenco Date: Tue, 25 Jan 2022 14:11:31 -0500 Subject: [PATCH] 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. --- openvidu-browser/src/OpenVidu/StreamManager.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/openvidu-browser/src/OpenVidu/StreamManager.ts b/openvidu-browser/src/OpenVidu/StreamManager.ts index 2ec3c588..c840fcf5 100644 --- a/openvidu-browser/src/OpenVidu/StreamManager.ts +++ b/openvidu-browser/src/OpenVidu/StreamManager.ts @@ -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; } -} \ No newline at end of file +}