ABR Player

This is a player that supports playback of DASH and HLS files and is based on shaka-player.

Shaka player comes with a lot of capabilities and functionallity. In order to take advantage of all features we provide access to the player instance through player.api.shakaInstance, additionally we expose some utility methods to configure the instance as well.

  • player.api.configureShaka() - wrapper to configure the shaka player instance.
  • player.api.registerRequestFilter() - wrapper to register a network interceptor for shaka.

DRM

Shaka player enables playback of DRM encoded content.

Hierarchy

  • Player
    • AbrPlayer

Constructors

  • Creates an instance.

    Parameters

    • master: HTMLVideoElement

      The video element that should load an HLS file.

    • key: string

      The licens key to Accurate Player

    • Optional settings: Partial<AbrPlayerSettings>

      Settings controlling some basic functionality of the player.

    Returns AbrPlayer

Properties

_internalEventBus: EventMixin

Internal event bus.

Contains methods controlling the playback.

master: HTMLVideoElement
version: string = ...

Accessors

  • get about(): string[]
  • Collects information about the player setup. Including versions for core, controller and all plugins.

    Returns string[]

Methods

  • Adds an event listener for a specific event.

    Parameters

    • type: string

      Event type.

    • callback: ((...args: any[]) => void)

      Listener callback function.

        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional once: boolean

      (Optional) Indicating that the listener should be invoked at most once after being added. If true, the listener would be automatically removed when invoked.

    Returns void

  • Destroys the player, service api layer and all registered plugins.

    Returns Promise<void>

  • Emits a player event.

    Type Parameters

    • T extends PlayerEvent

    Parameters

    • event: T

      Event that contains at least a 'type' property.

    Returns void

  • Returns the current settings for the player.

    Returns PlayerSettings

  • Alias method for removeEventListener.

    Parameters

    • type: string

      Event type.

    • callback: ((...args: any[]) => void)

      Listener callback function.

        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

  • Alias method for addEventListener.

    Parameters

    • type: string

      Event type.

    • callback: ((...args: any[]) => void)

      Listener callback function.

        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional once: boolean

      (Optional) Indicating that the listener should be invoked at most once after being added. If true, the listener would be automatically removed when invoked.

    Returns void

  • Registers a plugin if it doesn't already exist.

    Parameters

    • plugin: Plugin

      The plugin to register.

    Returns void

  • Removes all listeners.

    Returns void

  • Removes an event listener for a specific event.

    Parameters

    • type: string

      Event type.

    • callback: ((...args: any[]) => void)

      Listener callback function.

        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

  • Unregisters a plugin if it exists.

    Parameters

    • plugin: Plugin

      The plugin to unregister.

    Returns void