Class ZegoMediaPlayerImpl
Constructors
constructor
-
Parameters
Properties
Private _index
_index: number
Methods
Private _callMethod
- _callMethod<T>(method: string, args?: undefined | {}): Promise<T>
-
Type parameters
Parameters
-
method: string
-
Optional args: undefined | {}
Returns Promise<T>
enableAccurateSeek
-
Parameters
Returns Promise<void>
enableAux
- enableAux(enable: boolean): Promise<void>
-
Parameters
Returns Promise<void>
enableRepeat
- enableRepeat(enable: boolean): Promise<void>
-
Parameters
Returns Promise<void>
getAudioTrackCount
- getAudioTrackCount(): Promise<number>
-
Returns Promise<number>
getCurrentProgress
- getCurrentProgress(): Promise<number>
-
Returns Promise<number>
getCurrentState
-
getIndex
-
Returns number
getNetworkResourceCache
-
getPlayVolume
- getPlayVolume(): Promise<number>
-
Returns Promise<number>
getPublishVolume
- getPublishVolume(): Promise<number>
-
Returns Promise<number>
getTotalDuration
- getTotalDuration(): Promise<number>
-
Returns Promise<number>
loadResource
-
Parameters
loadResourceWithConfig
-
Parameters
muteLocal
- muteLocal(mute: boolean): Promise<void>
-
Parameters
Returns Promise<void>
off
- off<MediaPlayerEventType>(event: MediaPlayerEventType, callback?: ZegoMediaPlayerListener[MediaPlayerEventType]): void
-
Type parameters
Parameters
-
event: MediaPlayerEventType
-
Optional callback: ZegoMediaPlayerListener[MediaPlayerEventType]
Returns void
on
- on<MediaPlayerEventType>(event: MediaPlayerEventType, callback: ZegoMediaPlayerListener[MediaPlayerEventType]): void
-
Type parameters
Parameters
-
event: MediaPlayerEventType
-
callback: ZegoMediaPlayerListener[MediaPlayerEventType]
Returns void
pause
-
Returns Promise<void>
resume
-
Returns Promise<void>
seekTo
-
Parameters
setAudioTrackIndex
- setAudioTrackIndex(index: number): Promise<void>
-
Parameters
Returns Promise<void>
setNetworkBufferThreshold
- setNetworkBufferThreshold(threshold: number): Promise<void>
-
Parameters
Returns Promise<void>
setNetworkResourceMaxCache
- setNetworkResourceMaxCache(time: number, size: number): Promise<void>
-
Parameters
-
time: number
-
size: number
Returns Promise<void>
setPlaySpeed
- setPlaySpeed(speed: number): Promise<void>
-
Parameters
Returns Promise<void>
setPlayVolume
- setPlayVolume(volume: number): Promise<void>
-
Parameters
Returns Promise<void>
setPlayerView
- setPlayerView(playerID: number): Promise<void>
-
Parameters
Returns Promise<void>
setProgressInterval
- setProgressInterval(millisecond: number): Promise<void>
-
Parameters
Returns Promise<void>
setPublishVolume
- setPublishVolume(volume: number): Promise<void>
-
Parameters
Returns Promise<void>
setVoiceChangerParam
-
Parameters
Returns Promise<void>
setVolume
- setVolume(volume: number): Promise<void>
-
Parameters
Returns Promise<void>
start
-
Returns Promise<void>
stop
-
Returns Promise<void>
takeSnapshot
-