Class: shaka.polyfill.PatchedMediaKeysMs.MediaKeySession

Constructor

new MediaKeySession(nativeMediaKeys, sessionType)

An implementation of MediaKeySession.
Parameters:
Name Type Description
nativeMediaKeys MSMediaKeys
sessionType string
Implements:
  • MediaKeySession
Extends:
Source:

Members

(non-null) closed :shaka.util.PublicPromise

Type:
Source:

dispatchTarget :EventTarget

The target of all dispatched events. Defaults to |this|.
Type:
  • EventTarget
Inherited From:
Source:

(private, non-null) eventManager_ :shaka.util.EventManager

Type:
Source:

expiration :number

Type:
  • number
Source:

(private) generateRequestPromise_ :shaka.util.PublicPromise

Type:
Source:

(non-null) keyStatuses :shaka.polyfill.PatchedMediaKeysMs.MediaKeyStatusMap

Type:
Source:

(private, non-null) listeners_ :shaka.util.MultiMap.<shaka.util.FakeEventTarget.ListenerType>

Type:
Inherited From:
Source:

(private) nativeMediaKeys_ :MSMediaKeys

Type:
  • MSMediaKeys
Source:

(private) nativeMediaKeySession_ :MSMediaKeySession

Type:
  • MSMediaKeySession
Source:

sessionId :string

Type:
  • string
Source:

(private) updatePromise_ :shaka.util.PublicPromise

Type:
Source:

Methods

addEventListener(type, listener, opt_optionsopt)

Add an event listener to this object.
Parameters:
Name Type Attributes Description
type string The event type to listen for.
listener shaka.util.FakeEventTarget.ListenerType The callback or listener object to invoke.
opt_options AddEventListenerOptions | boolean <optional>
Ignored.
Inherited From:
Source:

close()

Source:

dispatchEvent(eventnon-null) → {boolean}

Dispatch an event from this object.
Parameters:
Name Type Description
event Event The event to be dispatched from this object.
Inherited From:
Source:
Returns:
True if the default action was prevented.
Type
boolean

generateRequest()

Source:

load()

Source:

(private) onMsKeyAdded_(eventnon-null)

Handler for the native keyadded event on MSMediaKeySession.
Parameters:
Name Type Description
event MediaKeyEvent
Source:

(private) onMsKeyError_(eventnon-null)

Handler for the native keyerror event on MSMediaKeySession.
Parameters:
Name Type Description
event MediaKeyEvent
Source:

(private) onMsKeyMessage_(eventnon-null)

Handler for the native keymessage event on MSMediaKeySession.
Parameters:
Name Type Description
event MediaKeyEvent
Source:

remove()

Source:

removeEventListener(type, listener, opt_optionsopt)

Remove an event listener from this object.
Parameters:
Name Type Attributes Description
type string The event type for which you wish to remove a listener.
listener shaka.util.FakeEventTarget.ListenerType The callback or listener object to remove.
opt_options EventListenerOptions | boolean <optional>
Ignored.
Inherited From:
Source:

update()

Source:

(private) updateKeyStatus_(status)

Update key status and dispatch a 'keystatuseschange' event.
Parameters:
Name Type Description
status string
Source: