MediaRecorder

open class MediaRecorder(val stream: MediaStream, options: MediaRecorderOptions = definedExternally) : EventTarget(source)

The MediaRecorder interface of the MediaStream Recording API provides functionality to easily record media.

MDN Reference

Constructors

Link copied to clipboard
constructor(stream: MediaStream, options: MediaRecorderOptions = definedExternally)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The audioBitsPerSecond read-only property of the MediaRecorder interface returns the audio encoding bit rate in use.

Link copied to clipboard

The mimeType read-only property of the MediaRecorder interface returns the MIME media type that was specified when creating the MediaRecorder object, or, if none was specified, which was chosen by the browser.

Link copied to clipboard

The state read-only property of the MediaRecorder interface returns the current state of the current MediaRecorder object.

Link copied to clipboard

The stream read-only property of the MediaRecorder interface returns the stream that was passed into the MediaRecorder.MediaRecorder constructor when the MediaRecorder was created.

Link copied to clipboard

The videoBitsPerSecond read-only property of the MediaRecorder interface returns the video encoding bit rate in use.

Functions

Link copied to clipboard
Link copied to clipboard
fun pause()

The pause() method of the MediaRecorder interface is used to pause recording of media streams.

Link copied to clipboard

The requestData() method of the MediaRecorder interface is used to raise a MediaRecorder.dataavailable_event event containing a called.

Link copied to clipboard
fun resume()

The resume() method of the MediaRecorder interface is used to resume media recording when it has been previously paused.

Link copied to clipboard
fun start(timeslice: Int = definedExternally)

The start() method of the MediaRecorder interface begins recording media into one or more Blob objects.

Link copied to clipboard
fun stop()

The stop() method of the MediaRecorder interface is used to stop media capture.

Link copied to clipboard