Options
All
  • Public
  • Public/Protected
  • All
Menu

Adapter layer should encapsulate the HtmlMediaElement and objects like hls.js or shaka-player.js. This layer should have no or little logic.

Hierarchy

  • Adapter

Implements

Index

Constructors

constructor

  • Parameters

    • master: HTMLMediaElement
    • eventCallback: <T>(event: T) => void
        • <T>(event: T): void
        • Type parameters

          Parameters

          • event: T

          Returns void

    • _internalEventBus: EventMixin
    • settings: PlayerSettings

    Returns Adapter

Properties

master

master: HTMLMediaElement

muted

muted: boolean = false

videoFiles

videoFiles: VideoFile[] = []

Accessors

currentTime

  • get currentTime(): number
  • Returns number

currentVideoFile

  • Gets the current videoFile based on the enabled property. Always defaults to the first if only one videoFile is defined.

    Returns VideoFile

duration

  • get duration(): number
  • Returns number

frameRate

  • get frameRate(): number
  • Returns number

loaded

  • get loaded(): boolean
  • set loaded(loaded: boolean): void
  • Indicates that the adapter is ready for continued playback. Triggers internal action PlayerActionType.UpdateLoaded when changed.

    Returns boolean

  • Indicates that the adapter is ready for continued playback. Triggers internal action PlayerActionType.UpdateLoaded when changed.

    Parameters

    • loaded: boolean

    Returns void

paused

  • get paused(): boolean
  • Returns boolean

playbackRate

  • get playbackRate(): number
  • Returns number

seeking

  • get seeking(): boolean
  • Returns boolean

Methods

Abstract destroy

  • destroy(): Promise<void>
  • Returns Promise<void>

Abstract getPlayerStatus

  • Returns PlayerStatus

getVolume

  • getVolume(): number

isMuted

  • isMuted(): boolean

isMutedMuxed

  • isMutedMuxed(): boolean

loadVideoFile

  • Parameters

    Returns void

mute

  • mute(): void
  • Mute.

    Returns void

muteMuxed

  • muteMuxed(): void

pause

  • pause(): void
  • Pause

    Returns void

play

  • play(): Promise<void>
  • Play

    Returns Promise<void>

setCurrentTime

  • setCurrentTime(time: number): void
  • Sets the currentTime.

    Parameters

    • time: number

      Time to set.

    Returns void

setDropFrame

  • setDropFrame(dropFrame: boolean): void
  • Set drop frame value for all loaded video files.

    Parameters

    • dropFrame: boolean

      Value to be set.

    Returns void

setFrameOffset

  • setFrameOffset(frameOffset: number): void
  • Set frame offset value for all loaded video files.

    Parameters

    • frameOffset: number

      Offset to be set.

    Returns void

setPlaybackRate

  • setPlaybackRate(rate: number): void
  • Sets the playback rate.

    Parameters

    • rate: number

      The new playback rate.

    Returns void

setVolume

  • setVolume(volume: number): void
  • Sets the audio volume.

    Parameters

    • volume: number

      The new volume value.

    Returns void

setVolumeController

  • Sets the default controller for the volume

    Parameters

    Returns void

toggleMute

  • toggleMute(): void

toggleMuteMuxed

  • toggleMuteMuxed(): void

unmute

  • unmute(): void

unmuteMuxed

  • unmuteMuxed(): void

updateVideoFile

  • Updates the given video file with new data

    Parameters

    • update: VideoFile

      the updated video file data

    Returns void