Skip to content

Instantly share code, notes, and snippets.

@triloknagvenkar
Created December 11, 2018 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save triloknagvenkar/86259f5d403d69d208633c0286ee63b8 to your computer and use it in GitHub Desktop.
Save triloknagvenkar/86259f5d403d69d208633c0286ee63b8 to your computer and use it in GitHub Desktop.
/*
When the stop() method is invoked, the UA queues a task that runs the following steps:
1 - If MediaRecorder.state is "inactive", raise a DOM InvalidState error and terminate these steps.
If the MediaRecorder.state is not "inactive", continue on to the next step.
2 - Set the MediaRecorder.state to "inactive" and stop capturing media.
3 - Raise a dataavailable event containing the Blob of data that has been gathered.
4 - Raise a stop event.
*/
stopRecording(id) {
var self = this;
self.recorder.stop();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment