This whole thing happens using an API, which is MediaRecorder API. This API provides functionality to record media such as audio or video. It is created using the MediaRecorder() constructor.
The Promises are as follows:
- resolve : If all permissions are achieved and the microphone or camera are working fine, then it returns a MediaStream object. This is the main recorded data.
- NotAllowedError: If the user reject the permission for recording.
- NotFoundError: If there is no media track.
- NotReadableError: If the input devices are not found or the hardware is not working.
- OverconstrainedError: If constraint audio settings are preventing.
- AbortError: If generic unknown cause is found.
Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML course.