зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1537986 - Add deviceId and groupId to all camera and microphone settings. r=jib,smaug
Differential Revision: https://phabricator.services.mozilla.com/D32964 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
612199b2c5
Коммит
d80077c20a
|
@ -4260,7 +4260,15 @@ void SourceListener::StopTrack(const RefPtr<SourceListener>& self,
|
|||
void SourceListener::GetSettingsFor(
|
||||
TrackID aTrackID, dom::MediaTrackSettings& aOutSettings) const {
|
||||
MOZ_ASSERT(NS_IsMainThread(), "Only call on main thread");
|
||||
GetDeviceStateFor(aTrackID).mDevice->GetSettings(aOutSettings);
|
||||
DeviceState& state = GetDeviceStateFor(aTrackID);
|
||||
state.mDevice->GetSettings(aOutSettings);
|
||||
|
||||
MediaSourceEnum mediaSource = state.mDevice->GetMediaSource();
|
||||
if (mediaSource == MediaSourceEnum::Camera ||
|
||||
mediaSource == MediaSourceEnum::Microphone) {
|
||||
aOutSettings.mDeviceId.Construct(state.mDevice->mID);
|
||||
aOutSettings.mGroupId.Construct(state.mDevice->mGroupID);
|
||||
}
|
||||
}
|
||||
|
||||
void SourceListener::SetEnabledFor(TrackID aTrackID, bool aEnable) {
|
||||
|
|
|
@ -12,11 +12,12 @@ dictionary MediaTrackSettings {
|
|||
long height;
|
||||
double frameRate;
|
||||
DOMString facingMode;
|
||||
DOMString deviceId;
|
||||
boolean echoCancellation;
|
||||
boolean noiseSuppression;
|
||||
boolean autoGainControl;
|
||||
boolean echoCancellation;
|
||||
boolean autoGainControl;
|
||||
boolean noiseSuppression;
|
||||
long channelCount;
|
||||
DOMString deviceId;
|
||||
DOMString groupId;
|
||||
|
||||
// Mozilla-specific extensions:
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче