package js.html
extends EventTarget
Available on js
The MediaRecorder interface of the MediaStream Recording API provides functionality to easily record media. It is created using the MediaRecorder() constructor.
Documentation MediaRecorder by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See also:
staticisTypeSupported(type:String):Boolnew(node:AudioNode, output:Int = 0, ?options:Null<MediaRecorderOptions>)new(stream:MediaStream, ?options:Null<MediaRecorderOptions>)Throws:
null |
DOMError |
|---|
read onlymimeType:StringReturns the MIME type that was selected as the recording container for the MediaRecorder object when it was created.
ondataavailable:Functiononerror:Functiononstart:Functiononstop:Functiononwarning:Functionread onlystate:RecordingStateReturns the current state of the MediaRecorder object (inactive, recording, or paused.)
read onlystream:MediaStreamReturns the stream that was passed into the constructor when the MediaRecorder was created.
pause():VoidPauses the recording of media.
Throws:
null |
DOMError |
|---|
requestData():VoidRequests a Blob containing the saved data received thus far (or since the last time requestData() was called. After calling this method, recording continues, but in a new Blob.
Throws:
null |
DOMError |
|---|
resume():VoidResumes recording of media after having been paused.
Throws:
null |
DOMError |
|---|
start(?timeSlice:Int):VoidBegins recording media; this method can optionally be passed a timeslice argument with a value in milliseconds. If this is specified, the media will be captured in separate chunks of that duration, rather than the default behavior of recording the media in a single large chunk.
Throws:
null |
DOMError |
|---|
stop():VoidStops recording, at which point a dataavailable event containing the final Blob of saved data is fired. No more recording occurs.
Throws:
null |
DOMError |
|---|
© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/MediaRecorder.html