mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1511416 -Screen sharing preview pops up in Camera permission prompt . r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D21976 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
0bcec64436
commit
3f1d5459d1
@ -496,10 +496,9 @@ function prompt(aBrowser, aRequest) {
|
||||
let doc = this.browser.ownerDocument;
|
||||
|
||||
// Clean-up video streams of screensharing previews.
|
||||
if ((aTopic == "dismissed" || aTopic == "removed") &&
|
||||
requestTypes.includes("Screen")) {
|
||||
if (((aTopic == "dismissed" || aTopic == "removed") &&
|
||||
requestTypes.includes("Screen")) || !(requestTypes.includes("Screen"))) {
|
||||
let video = doc.getElementById("webRTC-previewVideo");
|
||||
video.deviceId = undefined;
|
||||
if (video.stream) {
|
||||
video.stream.getTracks().forEach(t => t.stop());
|
||||
video.stream = null;
|
||||
|
Loading…
Reference in New Issue
Block a user