@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="MediaKeySession")
public class MediaKeySession
extends EventTarget
| Modifier and Type | Field and Description |
|---|---|
EventHandler |
onkeystatuseschange |
EventHandler |
onmessage |
| Modifier | Constructor and Description |
|---|---|
protected |
MediaKeySession() |
| Modifier and Type | Method and Description |
|---|---|
Promise<java.lang.Void> |
close()
The MediaKeySession.close() method notifies that the current media session is no longer needed, and that the content decryption module should release any resources associated with this object and close it.
|
Promise<java.lang.Void> |
closed()
The MediaKeySession.closed read-only property returns a Promise signaling when a MediaKeySession closes.
|
double |
expiration()
The MediaKeySession.expiration read-only property returns the time after which the keys in the current session can no longer be used to decrypt media data, or NaN if no such time exists.
|
Promise<java.lang.Void> |
generateRequest(java.lang.String initDataType,
BufferSource initData)
The MediaKeySession.generateRequest() method returns a Promise after generating a media request based on initialization data.
|
MediaKeyStatusMap |
keyStatuses()
The MediaKeySession.keyStatuses read-only property returns a reference to a read-only MediaKeyStatusMap of the current session's keys and their statuses.
|
Promise<java.lang.Boolean> |
load(java.lang.String sessionId)
The MediaKeySession.load() method returns a Promise that resolves to a boolean value after loading data for a specified session object.
|
Promise<java.lang.Void> |
remove()
The MediaKeySession.remove() method returns a Promise after removing any session data associated with the current object.
|
java.lang.String |
sessionId()
The MediaKeySession.sessionId is a read-only property that contains a unique string generated by the content decryption module (CDM) for the current media object and its associated keys or licenses.
|
Promise<java.lang.Void> |
update(BufferSource response)
The MediaKeySession.update() method loads messages and licenses to the CDM, and then returns a Promise.
|
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_, values@Nullable public EventHandler onkeystatuseschange
@Nullable public EventHandler onmessage
@JsProperty(name="closed") @Nonnull public Promise<java.lang.Void> closed()
@JsProperty(name="expiration") public double expiration()
@JsProperty(name="keyStatuses") @Nonnull public MediaKeyStatusMap keyStatuses()
@JsProperty(name="sessionId") @Nonnull public java.lang.String sessionId()
@Nonnull public Promise<java.lang.Void> close()
@Nonnull public Promise<java.lang.Void> generateRequest(@Nonnull java.lang.String initDataType, @Nonnull BufferSource initData)
@Nonnull public Promise<java.lang.Boolean> load(@Nonnull java.lang.String sessionId)
@Nonnull public Promise<java.lang.Void> remove()
@Nonnull public Promise<java.lang.Void> update(@Nonnull BufferSource response)