curriculum/challenges/english/blocks/lecture-working-with-audio-and-video/6733d8606fb893099e3d0df3.md
You've learned about the HTMLMediaElement and MediaStreams APIs, but there are a few more APIs that can be quite helpful in working with video and audio.
The first is the Screen Capture API. As the name might suggest, this API allows you to record a user's screen. This API is exposed by calling the getDisplayMedia() method of the mediaDevices object and consuming the returned media stream.
Then there is the MediaStream Recording API. This API works in tandem with the MediaStreams APIs, allowing you to record a MediaStream (or even an HTMLMediaElement directly). It then fires dataavailable events with Blob payloads you can write to the local file storage.
Underlying all of this technology is the Media Source Extensions API. The Media Source Extensions API is what allows you to directly pass a user's webcam feed to a video element with the srcObject property, for example.
And finally, the Web Audio API which powers everything audible on the web. This API includes important objects like an AudioBuffer (representing a Buffer specifically containing audio data) or the AudioContext.
And that wraps up our lessons on audio and video!
What is the primary function of the Screen Capture API?
To play video files.
Think about the meaning of "screen capture".
To record a user's screen.
To edit video content.
Think about the meaning of "screen capture".
To stream video from external sources.
Think about the meaning of "screen capture".
2
Which method is used to access the Screen Capture API?
getScreenMedia()
Remember that screens are considered displays.
captureScreen()
Remember that screens are considered displays.
getDisplayMedia()
recordScreen()
Remember that screens are considered displays.
3
Which API allows you to pass a user's webcam feed directly to a video element's srcObject property?
Screen Capture API
This core API extends the behavior of media sources.
MediaStream Recording API
This core API extends the behavior of media sources.
Media Source Extensions API
Web Audio API
This core API extends the behavior of media sources.
3