Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MediaPlayer

A class implementing the Player interface. Do not instantiate this class directly; instead, use the factory create function.

Hierarchy

  • MediaPlayer

Implements

Index

Methods

addEventListener

  • addEventListener<K>(name: K, fn: (payload: PlayerEventMap[K]) => void): void
  • Type parameters

    Parameters

    • name: K
    • fn: (payload: PlayerEventMap[K]) => void
        • (payload: PlayerEventMap[K]): void
        • Parameters

          • payload: PlayerEventMap[K]

          Returns void

    Returns void

attachHTMLVideoElement

  • attachHTMLVideoElement(videoElement: HTMLVideoElement): void

delete

  • delete(): void

getBufferDuration

  • getBufferDuration(): number

getBuffered

getDisplayHeight

  • getDisplayHeight(): number

getDisplayWidth

  • getDisplayWidth(): number

getDuration

  • getDuration(): number

getHTMLVideoElement

  • getHTMLVideoElement(): HTMLVideoElement

getLiveLatency

  • getLiveLatency(): number

getPlaybackRate

  • getPlaybackRate(): number

getPosition

  • getPosition(): number

getQualities

getQuality

getSessionId

  • getSessionId(): string | undefined

getState

getVersion

  • getVersion(): string

getVolume

  • getVolume(): number

isAutoQualityMode

  • isAutoQualityMode(): boolean

isAutoplay

  • isAutoplay(): boolean

isLiveLowLatency

  • isLiveLowLatency(): boolean

isMuted

  • isMuted(): boolean

isPaused

  • isPaused(): boolean

load

  • load(path: string, mediaType?: string): void
  • Parameters

    • path: string
    • Optional mediaType: string

    Returns void

pause

  • pause(): void

play

  • play(): void

removeEventListener

  • removeEventListener<K>(name: K, fn: (payload: PlayerEventMap[K]) => void): void
  • Type parameters

    Parameters

    • name: K
    • fn: (payload: PlayerEventMap[K]) => void
        • (payload: PlayerEventMap[K]): void
        • Parameters

          • payload: PlayerEventMap[K]

          Returns void

    Returns void

seekTo

  • seekTo(time: number): void
  • Parameters

    • time: number

    Returns void

setAutoMaxBitrate

  • setAutoMaxBitrate(bitrate: number): void
  • Parameters

    • bitrate: number

    Returns void

setAutoMaxQuality

  • setAutoMaxQuality(quality: Quality): void

setAutoQualityMode

  • setAutoQualityMode(enable: boolean): void

setAutoplay

  • setAutoplay(enabled: boolean): void

setLiveLowLatencyEnabled

  • setLiveLowLatencyEnabled(enable: boolean): void

setLogLevel

setMuted

  • setMuted(mute: boolean): void
  • Parameters

    • mute: boolean

    Returns void

setPlaybackRate

  • setPlaybackRate(rate: number): void

setQuality

  • setQuality(quality: Quality, adaptive?: boolean): void

setVolume

  • setVolume(volume: number): void
  • Parameters

    • volume: number

    Returns void

Generated using TypeDoc