June 2024
Beginner to intermediate
268 pages
6h 26m
English
When passing { audio: true, video: true } to getUserMedia(), you effectively defer to a given browser’s default settings for audio and video. And it’s quite possible that those sensible defaults are fine for your app.
But, if you know that you need, for example, videos that run at a smaller or larger size, or have reasons to adjust things like the frame rate of a video or the sample rate for audio, the MediaTrackConstraints dictionary is your friend.[95] Kind of.
If you look at the compatibility table for the different entries in the constraints dictionary,[96] you will discover that only a handful of properties—height, width, and frameRate for video, or echoCancellation for audio—are well supported ...
Read now
Unlock full access