mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 843190: Allow cameras/mics to be shared if permissions UI is disabled r=derf
This commit is contained in:
parent
55eba7043d
commit
9ae0592a36
@ -613,14 +613,18 @@ public:
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/**
|
||||
* We're allowing multiple tabs to access the same camera for parity
|
||||
* with Chrome. See bug 811757 for some of the issues surrounding
|
||||
* this decision. To disallow, we'd filter by IsAvailable() as we used
|
||||
* to.
|
||||
*/
|
||||
// Pick the first available device.
|
||||
for (uint32_t i = 0; i < count; i++) {
|
||||
nsRefPtr<MediaEngineVideoSource> vSource = videoSources[i];
|
||||
if (vSource->IsAvailable()) {
|
||||
found = true;
|
||||
mVideoDevice = new MediaDevice(videoSources[i]);
|
||||
break;
|
||||
}
|
||||
found = true;
|
||||
mVideoDevice = new MediaDevice(videoSources[i]);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
@ -647,11 +651,9 @@ public:
|
||||
|
||||
for (uint32_t i = 0; i < count; i++) {
|
||||
nsRefPtr<MediaEngineAudioSource> aSource = audioSources[i];
|
||||
if (aSource->IsAvailable()) {
|
||||
found = true;
|
||||
mAudioDevice = new MediaDevice(audioSources[i]);
|
||||
break;
|
||||
}
|
||||
found = true;
|
||||
mAudioDevice = new MediaDevice(audioSources[i]);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
|
Loading…
Reference in New Issue
Block a user