![]() |
AliyunPlayer
v5.2.0
Aliyun Player API Reference Manual for Windows Platforms
|
Public Member Functions | |
virtual void | addExtSubtitle (const char *URL)=0 |
Add external subtitles. More... | |
virtual void | destroy ()=0 |
Delete the player. More... | |
virtual void | enableHardwareDecoder (bool bEnabled)=0 |
Enable or disable hardware decoding. More... | |
virtual int64_t | getBufferedPosition ()=0 |
Query the buffered position. More... | |
virtual const char * | getCacheFilePath (const char *URL)=0 |
Query the name of the cached file with the specified URL. More... | |
virtual const char * | getCacheFilePath (const char *vid, const char *format, const char *definition, int previewTime)=0 |
Query the name of the cached file with the specified URL. More... | |
virtual AVPConfig * | getConfig ()=0 |
Query player configuration. More... | |
virtual int64_t | getCurrentPosition ()=0 |
Query the current playback position. More... | |
virtual AVPTrackInfo | getCurrentTrack (AVPTrackType type)=0 |
Query the track that is being played. More... | |
virtual int64_t | getDuration ()=0 |
Query the length of the video. More... | |
virtual int | getHeight ()=0 |
Query the height of the video. More... | |
virtual IAVPListener * | getListener ()=0 |
get listener More... | |
virtual int64_t | getMasterClockPts ()=0 |
get master clock pts More... | |
virtual AVPMediaInfo | getMediaInfo ()=0 |
Query media information, including track information. More... | |
virtual AVPMirrorMode | getMirrorMode ()=0 |
Query mirroring mode. More... | |
virtual float | getRate ()=0 |
Query the playback speed. More... | |
virtual AVPRotateMode | getRotateMode ()=0 |
Query rotate mode. More... | |
virtual int | getRotation ()=0 |
Query the rotate angle of the video, which is retrieved from the video metadata. More... | |
virtual AVPScalingMode | getScalingMode ()=0 |
Query zoom mode. More... | |
virtual void | getThumbnail (int64_t positionMs)=0 |
Retrieve the thumbnail image at the specified position. More... | |
virtual void * | getView ()=0 |
virtual float | getVolume ()=0 |
Query the volume of the player(Not system volume). More... | |
virtual int | getWidth ()=0 |
Query the width of the video. More... | |
virtual bool | isAutoPlay ()=0 |
Query whether enableautoplay. More... | |
virtual bool | isEnabledHardwareDecoder ()=0 |
Query whether enable hardware decoding. More... | |
virtual bool | isLoop ()=0 |
Query whether enable loop playback. More... | |
virtual bool | isMuted ()=0 |
Get mute status. More... | |
virtual void | pause ()=0 |
Pause. More... | |
virtual void | prepare ()=0 |
Prepare for playback. More... | |
virtual void | redraw ()=0 |
Refresh the view in certain situations, for example, when the size of the view changes. More... | |
virtual void | reset ()=0 |
Reset. More... | |
virtual void | seekToTime (int64_t time, AVPSeekMode seekMode)=0 |
Seek to a specified position. More... | |
virtual void | selectExtSubtitle (int trackIndex, bool enable)=0 |
Select external subtitles. More... | |
virtual void | selectTrack (int trackIndex)=0 |
Switch definition according to the specified track index. More... | |
virtual void | setAudioRenderingCallback (AudioRenderingCallback func, void *userData)=0 |
Set a audio rendering callback block. More... | |
virtual void | setAutoPlay (bool bAutoPlay)=0 |
Enable or disable autoplay. More... | |
virtual bool | setCacheConfig (AVPCacheConfig *cacheConfig)=0 |
Modify cache configuration. More... | |
virtual void | setConfig (AVPConfig *config)=0 |
Modify player configuration. More... | |
virtual void | setListener (IAVPListener *listener)=0 |
set listener More... | |
virtual void | setLoop (bool bLoop)=0 |
Enable or disable loop playback. More... | |
virtual void | setMirrorMode (AVPMirrorMode mirrorMode)=0 |
Set a mirroring mode. More... | |
virtual void | setMute (bool muted)=0 |
Mute or unmute the player. More... | |
virtual void | setRate (float rate)=0 |
Set the playback speed. More... | |
virtual void | setRotateMode (AVPRotateMode rotateMode)=0 |
Set a rotate mode. More... | |
virtual void | setScalingMode (AVPScalingMode scalingMode)=0 |
Set a zoom mode. More... | |
virtual void | setSource (const AVPUrlSource &source)=0 |
Play by URL. More... | |
virtual void | setSource (const AVPVidAuthSource &source)=0 |
Play by VID and playauth. More... | |
virtual void | setSource (const AVPVidMpsSource &source)=0 |
Play by VID and MPS. More... | |
virtual void | setSource (const AVPVidStsSource &source)=0 |
Play by VID and STS. More... | |
virtual void | setTraceID (const char *traceID)=0 |
Set a trace ID for debugging. More... | |
virtual void | setVideoRenderingCallback (VideoRenderingCallback func, void *userData)=0 |
Set a video rendering callback block. More... | |
virtual void | setView (void *view)=0 |
Set a player view (playerView). More... | |
virtual void | setVolume (float volume)=0 |
Set the volume of the player(Not system volume). More... | |
virtual void | snapshot ()=0 |
Snapshot. More... | |
virtual void | start ()=0 |
Start playing. More... | |
virtual void | stop ()=0 |
Stop. More... | |
virtual | ~AliPlayer ()=default |
Static Public Member Functions | |
static void | alivcFree (void *buffer) |
free memory allocate by sdk More... | |
static AliPlayer * | CreatePlayer () |
static void | enableLog (AVPLogLevel level) |
set the level of the log. More... | |
static const char * | getSDKVersion () |
Query the SDK version. More... | |
static void | setLogCallback (ApsaraPlayerLogCallback func, void *arg) |
Set a log output callback block. More... | |
|
virtualdefault |
|
pure virtual |
Add external subtitles.
URL | subtitle address |
|
static |
free memory allocate by sdk
|
static |
|
pure virtual |
Delete the player.
|
pure virtual |
Enable or disable hardware decoding.
|
static |
set the level of the log.
|
pure virtual |
Query the buffered position.
|
pure virtual |
Query the name of the cached file with the specified URL.
If the delegation failed, the default logic is used to generate the file name.
URL | The URL of the cached file. |
|
pure virtual |
Query the name of the cached file with the specified URL.
vid | The VID of the video. |
format | The format of the video. |
definition | The definition of the video. |
previewTime | The preview duration of the video. if 0, ignore this param |
|
pure virtual |
Query player configuration.
|
pure virtual |
Query the current playback position.
|
pure virtual |
|
pure virtual |
Query the length of the video.
|
pure virtual |
Query the height of the video.
|
pure virtual |
get listener
|
pure virtual |
get master clock pts
|
pure virtual |
Query media information, including track information.
|
pure virtual |
Query mirroring mode.
|
pure virtual |
Query the playback speed.
|
pure virtual |
Query rotate mode.
|
pure virtual |
Query the rotate angle of the video, which is retrieved from the video metadata.
|
pure virtual |
Query zoom mode.
|
static |
Query the SDK version.
|
pure virtual |
Retrieve the thumbnail image at the specified position.
positionMs | The specified position. |
|
pure virtual |
|
pure virtual |
Query the volume of the player(Not system volume).
|
pure virtual |
Query the width of the video.
|
pure virtual |
Query whether enableautoplay.
|
pure virtual |
Query whether enable hardware decoding.
|
pure virtual |
Query whether enable loop playback.
|
pure virtual |
Get mute status.
|
pure virtual |
Pause.
|
pure virtual |
Prepare for playback.
Asynchronous callback.
|
pure virtual |
Refresh the view in certain situations, for example, when the size of the view changes.
|
pure virtual |
Reset.
|
pure virtual |
Seek to a specified position.
time | The specified position that the player will seek to, Unit: millisecond. |
seekMode | Seek mode. |
|
pure virtual |
Select external subtitles.
trackIndex | caption index |
enable | true: select, false: close |
|
pure virtual |
Switch definition according to the specified track index.
trackIndex | Specify a definition index. SELECT_AVPTRACK_TYPE_VIDEO_AUTO: auto bitrate adjustment. |
|
pure virtual |
Set a audio rendering callback block.
|
pure virtual |
Enable or disable autoplay.
|
pure virtual |
Modify cache configuration.
AVPCacheConfig | Cache configuration. AVPCacheConfig. |
|
pure virtual |
|
pure virtual |
set listener
|
static |
Set a log output callback block.
Asynchronous.
|
pure virtual |
Enable or disable loop playback.
|
pure virtual |
Set a mirroring mode.
|
pure virtual |
Mute or unmute the player.
|
pure virtual |
Set the playback speed.
Valid values: 0.5 to 2.0. Value 1 indicates normal speed
|
pure virtual |
Set a rotate mode.
|
pure virtual |
Set a zoom mode.
|
pure virtual |
|
pure virtual |
Play by VID and playauth.
See https://help.aliyun.com/document_detail/57294.html
source | AVPVidAuthSource type. |
|
pure virtual |
Play by VID and MPS.
See https://help.aliyun.com/document_detail/53522.html
source | AVPVidMpsSource type. |
|
pure virtual |
Play by VID and STS.
For STS, see https://help.aliyun.com/document_detail/28756.html
source | AVPVidStsSource type. |
|
pure virtual |
Set a trace ID for debugging.
traceID | The specified client connection trace ID. |
|
pure virtual |
Set a video rendering callback block.
|
pure virtual |
Set a player view (playerView).
view: windows platform: HWND.
|
pure virtual |
Set the volume of the player(Not system volume).
The range is 0.0~2.0,it maybe lead to noise if set volume more then 1.0, not recommended.
|
pure virtual |
Snapshot.
data will be returned in onSnapshotImageBuffer callback
|
pure virtual |
Start playing.
|
pure virtual |
Stop.