Skip to content

Commit 7117f1a

Browse files
Merge pull request #7588 from Slowlife01/fixshare
2 parents 3932ec2 + 713e267 commit 7117f1a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/browser/base/zen-components/ZenMediaController.mjs

+3-2
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,10 @@
358358

359359
for (const browser of window.gBrowser.browsers) {
360360
const isMatch = browser.innerWindowID === windowId;
361+
const isCurrentBrowser = this._currentBrowser?.browserId === browser.browserId;
361362

362363
if (!isMatch) continue;
363-
if (showCameraIndicator || showMicrophoneIndicator) {
364+
if (!isCurrentBrowser && (showCameraIndicator || showMicrophoneIndicator)) {
364365
const webRTC = browser.browsingContext.currentWindowGlobal.getActor('WebRTC');
365366
webRTC.sendAsyncMessage('webrtc:UnmuteMicrophone');
366367
webRTC.sendAsyncMessage('webrtc:UnmuteCamera');
@@ -372,7 +373,7 @@
372373
this.activateMediaDeviceControls(browser)
373374
);
374375
} else this.activateMediaDeviceControls(browser);
375-
} else if (this.isSharing && !(showCameraIndicator || showMicrophoneIndicator)) {
376+
} else if (isCurrentBrowser && this.isSharing && !(showCameraIndicator || showMicrophoneIndicator)) {
376377
this.isSharing = false;
377378
this._currentBrowser = null;
378379
this.hideMediaControls();

0 commit comments

Comments
 (0)