@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.
|
EventHandler |
onsourceclose |
EventHandler |
onsourceended |
EventHandler |
onsourceopen |
| Modifier | Constructor and Description |
|---|---|
protected |
MediaSource() |
| 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.
|
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 |
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 |
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
@Nullable public EventHandler onsourceclose
@Nullable public EventHandler onsourceended
@Nullable public EventHandler onsourceopen
@JsProperty(name="activeSourceBuffers") @Nonnull public SourceBufferList activeSourceBuffers()
@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)
@Nonnull public 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)