@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="MediaRecorder")
public class MediaRecorder
extends EventTarget
| Modifier and Type | Field and Description |
|---|---|
@JsNullable EventHandler |
ondataavailable
The MediaRecorder.ondataavailable event handler (part of the MediaStream Recording API) handles the dataavailable event, letting you run code in response to Blob data being made available for use.
|
@JsNullable MediaRecorderErrorEventHandler |
onerror
The MediaRecorder interface's onerror event handler is called by the MediaStream Recording API when an error occurs.
|
@JsNullable EventHandler |
onpause
The MediaRecorder.onpause event handler (part of the MediaRecorder API) handles the pause event, allowing you to run code in response to the media recording being paused.
|
@JsNullable EventHandler |
onresume
The MediaRecorder.onresume event handler (part of the MediaRecorder API) handles the resume event, allowing you to run code in response to the media recording being resumed after pausing.
|
@JsNullable EventHandler |
onstart
The MediaRecorder.onstartevent handler (part of the MediaRecorder API) handles the start event, allowing you to run code in response to media recording being started by a MediaRecorder.
|
@JsNullable EventHandler |
onstop
The MediaRecorder.onstop event handler (part of the MediaRecorder API) handles the stop event, allowing you to run code in response to media recording via a MediaRecorder being stopped.
|
| Constructor and Description |
|---|
MediaRecorder(MediaStream stream)
The MediaRecorder() constructor creates a new MediaRecorder object that will record a specified MediaStream.
|
MediaRecorder(MediaStream stream,
MediaRecorderOptions options)
The MediaRecorder() constructor creates a new MediaRecorder object that will record a specified MediaStream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addErrorListener(MediaRecorderErrorEventListener callback) |
void |
addErrorListener(MediaRecorderErrorEventListener callback,
AddEventListenerOptions options) |
void |
addErrorListener(MediaRecorderErrorEventListener callback,
boolean useCapture) |
java.lang.String |
audioBitrateMode() |
int |
audioBitsPerSecond()
The audioBitsPerSecond read-only property of the MediaRecorder interface returns the audio encoding bit rate in use.
|
static boolean |
isTypeSupported(java.lang.String type)
The MediaRecorder.isTypeSupported() static method returns a Boolean which is true if the MIME type specified is one the user agent should be able to successfully record.
|
java.lang.String |
mimeType()
The mimeType read-only property returns the MIME media type that was specified when creating the MediaRecorder object, or, if none was specified, which was chosen by the browser.
|
void |
pause()
The Media.pause() method (part of the MediaRecorder API) is used to pause recording of media streams.
|
void |
removeErrorListener(MediaRecorderErrorEventListener callback) |
void |
removeErrorListener(MediaRecorderErrorEventListener callback,
boolean useCapture) |
void |
removeErrorListener(MediaRecorderErrorEventListener callback,
EventListenerOptions options) |
void |
requestData()
The MediaRecorder.requestData() method (part of the MediaRecorder API) is used to raise a dataavailable event containing a Blob object of the captured media as it was when the method was called.
|
void |
resume()
The MediaRecorder.resume() method (part of the MediaRecorder API) is used to resume media recording when it has been previously paused.
|
void |
start()
The MediaRecorder method start(), which is part of the MediaStream Recording API, begins recording media into one or more Blob objects.
|
void |
start(int timeslice)
The MediaRecorder method start(), which is part of the MediaStream Recording API, begins recording media into one or more Blob objects.
|
java.lang.String |
state()
The MediaRecorder.state read-only property returns the current state of the current MediaRecorder object.
|
void |
stop()
The MediaRecorder.stop() method (part of the MediaRecorder API) is used to stop media capture.
|
MediaStream |
stream()
The MediaRecorder.stream read-only property returns the stream that was passed into the MediaRecorder() constructor when the MediaRecorder was created.
|
int |
videoBitsPerSecond()
The videoBitsPerSecond read-only property of the MediaRecorder interface returns the video encoding bit rate in use.
|
addEventListener, addEventListener, addEventListener, dispatchEvent, removeEventListener, removeEventListener, removeEventListenerassign, create, create, defineProperties, defineProperty, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyDescriptor, getOwnPropertyDescriptors, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toString_, valueOf_, valuespublic @JsNullable EventHandler ondataavailable
public @JsNullable MediaRecorderErrorEventHandler onerror
public @JsNullable EventHandler onpause
public @JsNullable EventHandler onresume
public @JsNullable EventHandler onstart
public @JsNullable EventHandler onstop
public MediaRecorder(@Nonnull
MediaStream stream,
@Nonnull
MediaRecorderOptions options)
public MediaRecorder(@Nonnull
MediaStream stream)
@JsProperty(name="audioBitrateMode") @Nonnull @BitrateMode public java.lang.String audioBitrateMode()
@JsProperty(name="audioBitsPerSecond") public int audioBitsPerSecond()
@JsProperty(name="mimeType") @Nonnull public java.lang.String mimeType()
@JsProperty(name="state") @Nonnull @RecordingState public java.lang.String state()
@JsProperty(name="stream") @Nonnull public MediaStream stream()
@JsProperty(name="videoBitsPerSecond") public int videoBitsPerSecond()
public static boolean isTypeSupported(@Nonnull
java.lang.String type)
public void pause()
public void requestData()
public void resume()
public void start(int timeslice)
public void start()
public void stop()
@JsOverlay
public final void addErrorListener(@Nonnull
MediaRecorderErrorEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addErrorListener(@Nonnull
MediaRecorderErrorEventListener callback,
boolean useCapture)
@JsOverlay
public final void addErrorListener(@Nonnull
MediaRecorderErrorEventListener callback)
@JsOverlay
public final void removeErrorListener(@Nonnull
MediaRecorderErrorEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeErrorListener(@Nonnull
MediaRecorderErrorEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeErrorListener(@Nonnull
MediaRecorderErrorEventListener callback)