Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Adapter
    • HlsAdapter

Index

Constructors

constructor

  • new HlsAdapter(master: HTMLVideoElement, eventCallback: <T>(event: T) => void, internalEventBus: EventMixin, settings: HlsPlayerSettings): HlsAdapter
  • Parameters

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

          • T: PlayerEvent

          Parameters

          • event: T

          Returns void

    • internalEventBus: EventMixin
    • settings: HlsPlayerSettings

    Returns HlsAdapter

Properties

master

master: HTMLMediaElement

muted

muted: boolean

player

player: Hls

videoFiles

videoFiles: VideoFile[]

Accessors

currentTime

  • get currentTime(): number
  • Returns number

currentVideoFile

  • get currentVideoFile(): VideoFile
  • 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): any
  • 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 any

paused

  • get paused(): boolean
  • Returns boolean

playbackRate

  • get playbackRate(): number
  • Returns number

seeking

  • get seeking(): boolean
  • Returns boolean

Methods

autoLevelEnabled

  • autoLevelEnabled(): boolean
  • Returns boolean

destroy

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

getActiveAudioIndex

  • getActiveAudioIndex(): number
  • Returns number

getActiveSubtitleIndex

  • getActiveSubtitleIndex(): number
  • Returns number

getAudioTracks

getCurrentLevel

  • getCurrentLevel(): number
  • Returns number

getLevels

  • getLevels(): Level[]
  • Returns Level[]

getPlayerStatus

  • getPlayerStatus(): PlayerStatus
  • Returns PlayerStatus

getSubtitles

getVolume

  • getVolume(): number
  • Returns the volume.

    Returns number

isMuted

  • isMuted(): boolean
  • Returns boolean

isMutedMuxed

  • isMutedMuxed(): boolean
  • Returns boolean

loadVideoFile

  • loadVideoFile(videoFile: VideoFile): void
  • Parameters

    • videoFile: VideoFile

    Returns void

mute

  • mute(): void
  • Mute.

    Returns void

muteMuxed

  • muteMuxed(): void
  • Returns void

pause

  • pause(): void
  • Pause

    Returns void

play

  • play(): Promise<void>
  • Play

    Returns Promise<void>

setAudioTrack

  • setAudioTrack(index: number): void
  • Parameters

    • index: number

    Returns 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

setLevel

  • setLevel(index: number): void
  • Parameters

    • index: number

    Returns void

setPlaybackRate

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

    Parameters

    • rate: number

      The new playback rate.

    Returns void

setSubtitleTrack

  • setSubtitleTrack(index: number): void
  • Parameters

    • index: number

    Returns void

setVolume

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

    Parameters

    • volume: number

      The new volume value.

    Returns void

setVolumeController

  • setVolumeController(volumeController: VolumeController): void
  • Sets the default controller for the volume

    Parameters

    • volumeController: VolumeController

      the volume controller

    Returns void

toggleMute

  • toggleMute(): void
  • Toggle mute/unmute.

    Returns void

toggleMuteMuxed

  • toggleMuteMuxed(): void
  • Returns void

unmute

  • unmute(): void
  • Unmute.

    Returns void

unmuteMuxed

  • unmuteMuxed(): void
  • Returns void

updateVideoFile

  • updateVideoFile(update: VideoFile): void
  • Updates the given video file with new data

    Parameters

    • update: VideoFile

      the updated video file data

    Returns void