Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • MediaPlayer

Index

Constructors

constructor

  • Parameters

    • index: number

    Returns MediaPlayer

Properties

arrts

arrts: { loop: boolean; mute: boolean; playbackRate: number; volume: number }

Type declaration

  • loop: boolean
  • mute: boolean
  • playbackRate: number
  • volume: number

duration

duration: number = 0

index

index: number

mixing

mixing: boolean = false

src

src: string = ""

startPosition

startPosition: number = 0

viewElem

viewElem: HTMLMediaElement | any

Optional zegoWebRTC

zegoWebRTC: any

zegoWebrtcInstance

zegoWebrtcInstance: any

Methods

checkViewElem

  • checkViewElem(): boolean
  • Returns boolean

destroy

  • destroy(): void
  • Returns void

enableAccurateSeek

  • enableAccurateSeek(): void
  • Returns void

enableAux

  • enableAux(enable: boolean, player: MediaPlayer): Promise<void>
  • Parameters

    Returns Promise<void>

enableRepeat

  • enableRepeat(enable: boolean): void
  • Parameters

    • enable: boolean

    Returns void

getAudioTrackCount

  • getAudioTrackCount(): void
  • Returns void

getCurrentProgress

  • getCurrentProgress(): void
  • Returns void

getCurrentState

  • getCurrentState(): void
  • Returns void

getIndex

  • getIndex(): number
  • Returns number

getNetworkResourceCache

  • getNetworkResourceCache(): void
  • Returns void

getPlayVolume

  • getPlayVolume(): void
  • Returns void

getTotalDuration

  • getTotalDuration(): number
  • Returns number

loadResource

  • loadResource(path: string): undefined | Promise<unknown>
  • Parameters

    • path: string

    Returns undefined | Promise<unknown>

muteLocal

  • muteLocal(): void
  • Returns void

off

  • off(): void
  • Returns void

on

  • on(): void
  • Returns void

pause

  • pause(): void
  • Returns void

resume

  • resume(): void
  • Returns void

seekTo

  • seekTo(): void
  • Returns void

setAudioTrackIndex

  • setAudioTrackIndex(): void
  • Returns void

setElemVolume

  • setElemVolume(volume: number): void
  • Parameters

    • volume: number

    Returns void

setNetworkBufferThreshold

  • setNetworkBufferThreshold(): void
  • Returns void

setNetworkResourceMaxCache

  • setNetworkResourceMaxCache(): void
  • Returns void

setPlaySpeed

  • setPlaySpeed(speed: number): void
  • Parameters

    • speed: number

    Returns void

setPlayVolume

  • setPlayVolume(): void
  • Returns void

setPlayerCanvas

  • setPlayerCanvas(viewElem: HTMLMediaElement): Promise<void>
  • Parameters

    • viewElem: HTMLMediaElement

    Returns Promise<void>

setPlayerView

  • setPlayerView(id: string | number): Promise<void>
  • Parameters

    • id: string | number

    Returns Promise<void>

setProgressInterval

  • setProgressInterval(): void
  • Returns void

setPublishVolume

  • setPublishVolume(): void
  • Returns void

setVoiceChangerParam

  • setVoiceChangerParam(): void
  • Returns void

setVolume

  • setVolume(volume: number): void
  • Parameters

    • volume: number

    Returns void

setWebRtcInstance

  • setWebRtcInstance(zegoWebrtcInstance: any): void
  • Parameters

    • zegoWebrtcInstance: any

    Returns void

start

  • start(): void
  • Returns void

stop

  • stop(): void
  • Returns void

takeSnapshot

  • takeSnapshot(): void
  • Returns void

Generated using TypeDoc