@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="MediaSource")
public class MediaSource
extends EventTarget
implements MediaProvider
| Modifier and Type | Field and Description |
|---|---|
double |
duration
The duration property of the MediaSource interface gets and sets the duration of the current media being presented.
|
@JsNullable EventHandler |
onsourceclose |
@JsNullable EventHandler |
onsourceended |
@JsNullable EventHandler |
onsourceopen |
| Constructor and Description |
|---|
MediaSource()
The MediaSource() constructor of the MediaSource interface constructs and returns a new MediaSource object with no associated source buffers.
|
| Modifier and Type | Method and Description |
|---|---|
SourceBufferList |
activeSourceBuffers()
The activeSourceBuffers read-only property of the MediaSource interface returns a SourceBufferList object containing a subset of the SourceBuffer objects contained within sourceBuffers — the list of objects providing the selected video track, enabled audio tracks, and shown/hidden text tracks.
|
@JsNonNull SourceBuffer |
addSourceBuffer(java.lang.String type)
The addSourceBuffer() method of the MediaSource interface creates a new SourceBuffer of the given MIME type and adds it to the MediaSource's sourceBuffers list.
|
void |
addSourcecloseListener(EventListener callback) |
void |
addSourcecloseListener(EventListener callback,
AddEventListenerOptions options) |
void |
addSourcecloseListener(EventListener callback,
boolean useCapture) |
void |
addSourceendedListener(EventListener callback) |
void |
addSourceendedListener(EventListener callback,
AddEventListenerOptions options) |
void |
addSourceendedListener(EventListener callback,
boolean useCapture) |
void |
addSourceopenListener(EventListener callback) |
void |
addSourceopenListener(EventListener callback,
AddEventListenerOptions options) |
void |
addSourceopenListener(EventListener callback,
boolean useCapture) |
static boolean |
canConstructInDedicatedWorker() |
void |
clearLiveSeekableRange()
The clearLiveSeekableRange() method of the MediaSource interface clears a seekable range previously set with a call to setLiveSeekableRange().
|
void |
endOfStream()
The endOfStream() method of the MediaSource interface signals the end of the stream.
|
void |
endOfStream(java.lang.String error)
The endOfStream() method of the MediaSource interface signals the end of the stream.
|
static boolean |
isTypeSupported(java.lang.String type)
The MediaSource.isTypeSupported() static method returns a Boolean value which is true if the given MIME type is likely to be supported by the current user agent.
|
java.lang.String |
readyState()
The readyState read-only property of the MediaSource interface returns an enum representing the state of the current MediaSource.
|
void |
removeSourceBuffer(SourceBuffer sourceBuffer)
The removeSourceBuffer() method of the MediaSource interface removes the given SourceBuffer from the SourceBuffers list associated with this MediaSource object.
|
void |
removeSourcecloseListener(EventListener callback) |
void |
removeSourcecloseListener(EventListener callback,
boolean useCapture) |
void |
removeSourcecloseListener(EventListener callback,
EventListenerOptions options) |
void |
removeSourceendedListener(EventListener callback) |
void |
removeSourceendedListener(EventListener callback,
boolean useCapture) |
void |
removeSourceendedListener(EventListener callback,
EventListenerOptions options) |
void |
removeSourceopenListener(EventListener callback) |
void |
removeSourceopenListener(EventListener callback,
boolean useCapture) |
void |
removeSourceopenListener(EventListener callback,
EventListenerOptions options) |
void |
setLiveSeekableRange(double start,
double end)
The setLiveSeekableRange() method of the MediaSource interface sets the range that the user can seek to in the media element.
|
SourceBufferList |
sourceBuffers()
The sourceBuffers read-only property of the MediaSource interface returns a SourceBufferList object containing the list of SourceBuffer objects associated with this MediaSource.
|
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 double duration
public @JsNullable EventHandler onsourceclose
public @JsNullable EventHandler onsourceended
public @JsNullable EventHandler onsourceopen
public MediaSource()
@JsProperty(name="activeSourceBuffers") @Nonnull public SourceBufferList activeSourceBuffers()
@JsProperty(name="canConstructInDedicatedWorker") public static boolean canConstructInDedicatedWorker()
@JsProperty(name="readyState") @Nonnull @ReadyState public java.lang.String readyState()
@JsProperty(name="sourceBuffers") @Nonnull public SourceBufferList sourceBuffers()
public static boolean isTypeSupported(@Nonnull
java.lang.String type)
public @JsNonNull SourceBuffer addSourceBuffer(@Nonnull java.lang.String type)
public void clearLiveSeekableRange()
public void endOfStream(@EndOfStreamError @Nonnull java.lang.String error)
public void endOfStream()
public void removeSourceBuffer(@Nonnull
SourceBuffer sourceBuffer)
public void setLiveSeekableRange(double start,
double end)
@JsOverlay
public final void addSourceopenListener(@Nonnull
EventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addSourceopenListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void addSourceopenListener(@Nonnull
EventListener callback)
@JsOverlay
public final void removeSourceopenListener(@Nonnull
EventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeSourceopenListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void removeSourceopenListener(@Nonnull
EventListener callback)
@JsOverlay
public final void addSourceendedListener(@Nonnull
EventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addSourceendedListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void addSourceendedListener(@Nonnull
EventListener callback)
@JsOverlay
public final void removeSourceendedListener(@Nonnull
EventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeSourceendedListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void removeSourceendedListener(@Nonnull
EventListener callback)
@JsOverlay
public final void addSourcecloseListener(@Nonnull
EventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addSourcecloseListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void addSourcecloseListener(@Nonnull
EventListener callback)
@JsOverlay
public final void removeSourcecloseListener(@Nonnull
EventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeSourcecloseListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void removeSourcecloseListener(@Nonnull
EventListener callback)