Vinyl
    Preparing search index...

    Class DrmControllerImpl

    DrmController manages media keys and sessions, provides tracks a way to declare their content protections.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    logPrefix: string

    A string prefix for all log statements made by this target.

    Accessors

    • get "[toStringTag]"(): string

      Returns string

    • get activeSessions(): number

      Returns the number of currently active sessions.

      Returns number

    • get disposed(): boolean

      Returns boolean

    • get error(): null | Error

      The last error emitted. Use reset to reset error state.

      Returns null | Error

    Methods

    • Returns void

    • Closes all active DRM sessions. This should not be called unless the audio source has been cleared.

      Returns void

    • Configures this DrmController for the current track. This will override any player-level configuration.

      Parameters

      Returns void

    • Dispatches an event.

      Type Parameters

      Parameters

      • type: K

        The key of the event within EventMap

      • event: DrmControllerEventMap[K]

        If the passed event is read-only, then it may be re-used/cached. Otherwise, it should be a new event object every dispatch. If no target property is set on the event, the target will be set to this host.

      Returns void

    • Returns void

    • Initializes media keys if they have not yet been created and attached, creates a key session if the selected DrmProtection contains PSSH data.

      The first supported key system will be used. Once a key system has been set, it cannot be changed, all future content protections will be expected to contain the supported key system.

      Parameters

      • drmInfo: null | MediaFormatMetadata

        Format metadata for the representation. May contain content protections.

      • Optionalabort: ReadonlyAbort

        If aborted, the created session will be closed.

      Returns void

    • Returns true if Encrypted Media Extensions are supported.

      Returns boolean

    • Resets the error state.

      Returns void

    • Sets content protection data on drm controller for the currently buffering media.

      The key session will be created on the 'encrypted' event when the decoder has been initialized.

      Parameters

      • drmInfo: null | MediaFormatMetadata

        Format metadata for the representation. May contain content protections.

      • Optionalabort: ReadonlyAbort

        If aborted, the created session from an 'encrypted' event will be closed.

      Returns void