ZEGO::EXPRESS::IZegoMediaPlayer
Zego MediaPlayer.
Declared in
ZegoExpressInterface.h
Includes
Public-Func Lists
Public-Func Docs
setEventHandler
public void setEventHandler
(std::shared_ptr<
IZegoMediaPlayerEventHandler >
handler)
Set event callback handler for media player.
Parameters | |
---|---|
handler | Media player event callback object |
setVideoHandler
public void setVideoHandler
(std::shared_ptr<
IZegoMediaPlayerVideoHandler >
handler, ZegoVideoFrameFormat format)
Set video callback handler.
Parameters | |
---|---|
handler | Video event callback object for media player |
format | Video frame format for video data |
setAudioHandler
public void setAudioHandler
(std::shared_ptr<
IZegoMediaPlayerAudioHandler >
handler)
Set audio callback handler.
Parameters | |
---|---|
handler | Audio event callback object for media player |
loadResource
public void loadResource
(const std::string &
path, ZegoMediaPlayerLoadResourceCallback callback)
Load media resource.
Parameters | |
---|---|
path | the absolute path of the local resource or the URL of the network resource |
callback | Notification of resource loading results |
start
public void start
()
Start playing.
stop
public void stop
()
Stop playing.
pause
public void pause
()
Pause playing.
resume
public void resume
()
resume playing
seekTo
public void seekTo
(unsigned long long
millisecond, ZegoMediaPlayerSeekToCallback callback)
Set the specified playback progress.
Parameters | |
---|---|
millisecond | Point in time of specified playback progress |
callback | the result notification of set the specified playback progress |
enableRepeat
public void enableRepeat
(bool
enable)
Whether to repeat playback.
Parameters | |
---|---|
enable | repeat playback flag. The default is false. |
enableAux
public void enableAux
(bool
enable)
Whether to mix the player's sound into the stream being published.
Parameters | |
---|---|
enable | Aux audio flag. The default is false. |
muteLocal
public void muteLocal
(bool
mute)
Whether to play locally silently.
Parameters | |
---|---|
mute | Mute local audio flag, The default is false. |
setPlayerCanvas
public void setPlayerCanvas
( *
ZegoCanvas canvas)
Set the view of the player playing video.
Parameters | |
---|---|
canvas | Video rendered canvas object |
setVolume
public void setVolume
(int
volume)
Set player volume.
Parameters | |
---|---|
volume | The range is 0 ~ 100. The default is 50. |
setProgressInterval
public void setProgressInterval
(unsigned long long
millisecond)
Set playback progress callback interval.
Parameters | |
---|---|
millisecond | Interval of playback progress callback in milliseconds |
getVolume
public int getVolume
()
Get the current volume.
getTotalDuration
public unsigned long long getTotalDuration
()
Get the total progress of your media resources.
getCurrentProgress
public unsigned long long getCurrentProgress
()
Get current playing progress.
getCurrentState
public ZegoMediaPlayerState getCurrentState
()
Get the current playback status.
getIndex
public int getIndex
()
Get media player index.