-
Notifications
You must be signed in to change notification settings - Fork 18
Document the Audio and Video flow
test result of invoking audioTrack.getMediaStreamTrack().getSettings()
and audioTrack.getMediaStreamTrack().getConstraints()
:
For Chrome:
- passed customized microphoneDeviceId, echoCancellation, bitrate and sampleRate to create microphone track, but in result of
audioTrack.getMediaStreamTrack().getSettings()
, only device id is set correctly. echoCancellation result is always true, no bitrate in result, sampleRate is higher then what I pass.
The result of audioTrack.getMediaStreamTrack().getConstraints()
just contains correct deviceId and sampleRate.
-
After apply constraints manually. getSettings result doesn't change, getConstraints result does not change directly, but after several seconds, getConstraints changes.
-
When I wait for more seconds, getSettings result still doesn't change any more.
For Firefox:
-
Create microphone track situation: in both getSettings and getConstraints result, sampleRate and bitrate info are hidden, deviceId is right. But echoCancellation is always true in getSettings, meanwhile it's hidden in getConstraints
-
Apply constraints situation: getSettings result keeps same, getConstraints result can not see echoCancellation directly, but after several seconds, it changes.
-
When I wait for more seconds, echoCancellation in getSettings finally changes. Both autoGainControl and noiseSuppression changes to false with it.
conclusion: We can check current browser supported constraint list via navigator.mediaDevices.getSupportedConstraints()
, for constraints that are not in the list, it doesn't work if we pass to browser.