![]() |
AliyunPlayer v7.10.0
Aliyun Player API Reference Manual for iOS Platforms
|
#include "AliListPlayer.h"
Instance Methods | |
| (void) | - addUrlSource:uid: |
| Add a resource to the playlist. | |
| (void) | - addUrlSource:uid:config: |
| Add a resource to the playlist. | |
| (void) | - addVidSource:uid: |
| Add a resource to the playlist. | |
| (void) | - clear |
| Clear the playlist. | |
| (NSString *) | - currentUid |
| Query the UID of the resource that is being played. | |
| (void) | - destroy |
| Sync delete the player. | |
| (void) | - destroyAsync |
| Async delete the player. | |
| (void) | - enableStrategy:enable: |
| enable preload strategy. | |
| (AliPlayer *) | - getCurrentPlayer |
| (AVPMultiBitratesMode) | - GetMultiBiratesMode |
| Get current MultiBitrate preload mode. | |
| (AliPlayer *) | - getPreRenderPlayer |
| (instancetype) | - init |
| Initialize the playlist. | |
| (instancetype) | - init: |
| Initialize the player. | |
| (BOOL) | - moveTo: |
| Seek to the specified position and prepare for playback. | |
| (BOOL) | - moveTo:accId:accKey:token:region: |
| Seek to the specified resource and prepare for playback. | |
| (BOOL) | - moveTo:playAuth: |
| Seek to the specified resource and prepare for playback. | |
| (BOOL) | - moveToNext |
| Seek to the next resource and prepare for playback. | |
| (BOOL) | - moveToNext: |
| Seek to the next resource and prepare for playback. | |
| (BOOL) | - moveToNext:accKey:token:region: |
| Seek to the next resource and prepare for playback. | |
| (BOOL) | - moveToNextWithPrerendered |
| Seek to the next resource and prepare for playback. | |
| (BOOL) | - moveToNextWithPrerendered: |
| Seek to the next resource and prepare for playback. | |
| (BOOL) | - moveToNextWithPrerendered:accKey:token:region: |
| Seek to the next resource and prepare for playback. | |
| (BOOL) | - moveToPre |
| Seek to the previous resource and prepare for playback. | |
| (BOOL) | - moveToPre: |
| Seek to the previous resource and prepare for playback. | |
| (BOOL) | - moveToPre:accKey:token:region: |
| Seek to the previous resource and prepare for playback. | |
| (void) | - removeSource: |
| Remove a resource from the playlist. | |
| (void) | - SetMultiBitratesMode: |
| SetMultiBitrate preload mode. | |
| (void) | - setOption:valueInt: |
| Set player specific option (integer value). | |
| (void) | - setPreloadCount:nextCount: |
| update set preload count | |
| (void) | - setScene: |
| Set preload scene. | |
| (void) | - setStrategyParam:strategyParam: |
| set strategy parameter. | |
| (void) | - stop |
| Stop playback. | |
| (void) | - updatePreloadConfig: |
| update preload config related to uid | |
| (void) | - updatePreloadConfiguid:config: |
| update preload config | |
| Instance Methods inherited from AliPlayer | |
| (void) | - addExtSubtitle: |
| Add external subtitle file. | |
| (void) | - clearScreen |
| Clear screen. | |
| (void) | - clearScreenSync |
| Clear screen sync, suggest using clearScreen. | |
| (void) | - enableDowngrade:config: |
| Set player downgrade configuration, applicable to RTS custom downgrade url settings, for details please refer to RTS自定义降级url设置. | |
| (NSString *) | - getCacheFilePath: |
| Query the name of the cached file with the specified URL. | |
| (NSString *) | - getCacheFilePath:format:definition: |
| Query the name of the cached file with the specified URL. | |
| (NSString *) | - getCacheFilePath:format:definition:previewTime: |
| Query the name of the cached file with the specified URL. | |
| (AVPConfig *) | - getConfig |
| Query player configuration. | |
| (AVPTrackInfo *) | - getCurrentTrack: |
| Query the track that is being played. | |
| (AVPMediaInfo *) | - getMediaInfo |
| Query media information. | |
| (NSString *) | - getOption: |
| Get player option parameter. | |
| (int64_t) | - getPlayedDuration |
| Get the actual played duration. | |
| (void *) | - getPlayer |
| (NSString *) | - getPlayerName |
| Get used player name. | |
| (NSString *) | - getPropertyString: |
| Get player property information. | |
| (AVPMediaInfo *) | - getSubMediaInfo |
| Query sub-stream media information. | |
| (void) | - getThumbnail: |
| Retrieve the thumbnail image at the specified position. | |
| (NSString *) | - getUserData |
| Get user data of the player instance. | |
| (int) | - invokeComponent: |
| Send command to component. | |
| (BOOL) | - isAutoBandWidth |
| Query the status of adaptive initial quality selection for multi-bitrate playback. | |
| (BOOL) | - isEnableSubtitleRender |
| Query whether subtitle rendering is enabled. | |
| (void) | - pause |
| Pause playback. | |
| (void) | - prepare |
| Prepare for playback. | |
| (void) | - redraw |
| Refresh the view in certain situations, for example, when the size of the view changes. | |
| (void) | - reload |
| Reload resources. | |
| (void) | - reset |
| Reset. | |
| (void) | - seekToTime:seekMode: |
| Seek to a specified position. | |
| (void) | - selectExtSubtitle:enable: |
| Select or disable external subtitle track. | |
| (void) | - selectTrack: |
| Switch video quality according to the specified track index. | |
| (void) | - selectTrack:accurate: |
| Switch video quality according to the specified track index with accurate seeking option. | |
| (void) | - sendCustomEvent: |
| Send custom analytics event. | |
| (void) | - setAuthSource: |
| Play by VID and playauth. | |
| (void) | - setAutoBandWidth: |
| Enable or disable adaptive initial playback quality selection for multi-bitrate playback. | |
| (void) | - setBitStreamSource: |
| Play by bit stream. | |
| (BOOL) | - setCacheConfig: |
| Modify cache configuration. | |
| (void) | - setConfig: |
| Modify player configuration. | |
| (void) | - setDefaultBandWidth: |
| Set the default initial playback bitrate for multi-bitrate playback. | |
| (void) | - setDefaultResolution: |
| Set the default initial playback resolution for multi-bitrate playback. | |
| (void) | - setEnableSubtitleRender: |
| Enable or disable subtitle rendering. | |
| (void) | - setEventReportParamsDelegate: |
| Set event report delegate. | |
| (void) | - setFilterConfig: |
| Set filter configuration. | |
| (void) | - setFilterInvalid:invalid: |
| Enable or disable filter. | |
| (void) | - setLiveStsSource: |
| Play by LiveSts. | |
| (void) | - setMaxAccurateSeekDelta: |
| Set the maximum interval for accurate seeking. | |
| (void) | - setMpsSource: |
| Play by VID and MPS. | |
| (void) | - setOnURLSourceExpiredCallback: |
| Set the callback for URL source expiration notification. | |
| (void) | - setOnVidAuthExpiredCallback: |
| Set the callback for VidAuth source expiration notification. | |
| (void) | - setOption:value: |
| Set player specific option (string value). | |
| (void) | - setPictureinPictureDelegate: |
| Set delegate for picture-in-picture functionality. | |
| (void) | - setPictureInPictureEnable: |
| Enable or disable picture-in-picture functionality. | |
| (void) | - setPictureInPictureShowMode: |
| Set display mode for picture-in-picture functionality. | |
| (void) | - setPlayerScene: |
| Set player scene. | |
| (void) | - setPlayUrlConvertCallback: |
| Set a URL conversion callback. | |
| (void) | - setPreferPlayerName: |
| Set preferred player kernel. | |
| (void) | - setStartTime:seekMode: |
| Set the initial playback position. | |
| (void) | - setStreamDelayTime:time: |
| set the delay time of the stream, default is 0 only support external subtitles | |
| (void) | - setStsSource: |
| Play by VID and STS. | |
| (void) | - setThumbnailUrl: |
| Specify a thumbnail image URL. | |
| (void) | - setTraceID: |
| Set a trace ID for debugging. | |
| (void) | - setUrlSource: |
| Play by URL. | |
| (void) | - setUserData: |
| Set user data for the player instance. | |
| (void) | - setVerifyStsCallback: |
| Set STS validity verification callback for encrypted live streaming. | |
| (void) | - setVideoTag:size: |
| Set the video tags. | |
| (void) | - snapShot |
| Capture the current frame. | |
| (void) | - start |
| Start playing. | |
| (void) | - switchStream: |
| Multi definition stream switch by url. | |
| (void) | - updateFilterConfig:options: |
| Update filter configuration. | |
| (void) | - updateLiveStsInfo:accKey:token:region: |
| Update LiveStsInfo. | |
Properties | |
| int | maxPreloadMemorySizeMB |
| Set the maximum preloading cache size. | |
| NSString * | playAuthPreloadDefinition |
| int | preloadCount |
| Query or set the number of preloaded resources. | |
| NSString * | stsPreloadDefinition |
| Query or set the definition for playback by STS, such as LD or HD. | |
| Properties inherited from AliPlayer | |
| id< CicadaRenderDelegate > renderDelegate | __deprecated |
| Set the render callback. | |
| AVPAlphaRenderMode | alphaRenderMode |
| Set alpha render mode, can be used on gift play on live stream, etc. | |
| BOOL | autoPlay |
| Enable or disable autoplay. | |
| int64_t | bufferedPosition |
| Buffered position. | |
| int64_t | currentDownloadSpeed |
| Current network download speed. | |
| int64_t | currentPosition |
| Current playback position. | |
| int64_t | currentUtcTime |
| Query the current playback utc time. | |
| id< AVPDelegate > | delegate |
| Player delegate. | |
| id< AVPDrmDelegate > | drmDelegate |
| DRM delegate. | |
| int64_t | duration |
| Playback duration. | |
| BOOL | enableHardwareDecoder |
| Hardware decoding enabled state. | |
| id< AVPEventReportParamsDelegate > | eventReportParamsDelegate |
| Set the event report callback. | |
| int | height |
| Query the height of the video. | |
| int64_t | localCacheLoadedSize |
| Local cache hit size. | |
| BOOL | loop |
| Enable or disable loop playback. | |
| AVPMirrorMode | mirrorMode |
| Set a mirroring mode. | |
| BOOL | muted |
| Mute or unmute the player. | |
| AVPOutputAudioChannel | outputAudioChannel |
| Set the output audio channel, if input source is stereo, support select to left or right channel and if intput source is mono, this api can't take effect. | |
| AVPStatus | playerStatus |
| Player status. | |
| AVPView * | playerView |
| Set a player view (playerView). | |
| float | rate |
| Set the playback speed. | |
| id< CicadaRenderingDelegate > | renderingDelegate |
| Video rendering delegate (new). | |
| AVPRotateMode | rotateMode |
| Set a rotate mode. | |
| int | rotation |
| Query the rotate angle of the video, which is retrieved from the video metadata. | |
| AVPScalingMode | scalingMode |
| Set a zoom mode. | |
| float | volume |
| Query or set the volume of the player(Not system volume). | |
| int | width |
| Query the width of the video. | |
Additional Inherited Members | |
| Class Methods inherited from AliPlayer | |
| (NSString *) | + getDeviceUUID |
| Query device UUID. | |
| (NSString *) | + getSDKVersion |
| Query the SDK version. | |
| (void) | + initPlayerComponent:function: |
| Initialize player component. | |
| (BOOL) | + isFeatureSupport: |
| Query feature support. | |
| (void) | + netWorkReConnect |
| reconnect all connections, call this when netWork router changed, and the player will use new router. | |
| (void) | + setAudioSessionDelegate: |
| Set AudioSession delegate. | |
| (void) | + setEnableLog: |
| Enable or disable logging. | |
| (void) | + setLogCallbackInfo:callbackBlock: |
| Set a log output callback block. | |
| (void) | + setLogOption:value: |
| Set log option. | |
| - (void) addUrlSource: | (NSString *) | url | |
| uid: | (NSString *) | uid |
Add a resource to the playlist.
| url | Specify a resource by URL. |
| uid | The UID of the resource, which uniquely identifies a resource. |
| - (void) addUrlSource: | (NSString *) | urlSource | |
| uid: | (NSString *) | uid | |
| config: | (AVPPreloadConfig *) | config |
Add a resource to the playlist.
| url | Specify a resource by URL. |
| uid | The UID of the resource, which uniquely identifies a resource. |
| config | preload config |
| - (void) addVidSource: | (NSString *) | vid | |
| uid: | (NSString *) | uid |
Add a resource to the playlist.
| vid | Specify a resource by VID. |
| uid | The UID of the resource, which uniquely identifies a resource. |
| - (void) clear |
Clear the playlist.
| - (NSString *) currentUid |
Query the UID of the resource that is being played.
| - (void) destroy |
Sync delete the player.
Implements AliPlayer.
| - (void) destroyAsync |
Async delete the player.
When instance is not needed, skip calling stop api and call this destroyAsync api can speed up view response. Once called, don't call prepare to start new play.
Implements AliPlayer.
| - (void) enableStrategy: | (AVPStrategyType) | type | |
| enable: | (bool) | enable |
enable preload strategy.
| type | strategy type, see AVPStrategyType |
| enable | enable strategy |
| - (AliPlayer *) getCurrentPlayer |
| - (AVPMultiBitratesMode) GetMultiBiratesMode |
Get current MultiBitrate preload mode.
| - (AliPlayer *) getPreRenderPlayer |
| - (instancetype) init |
Initialize the playlist.
Implements AliPlayer.
| - (instancetype) init: | (NSString *) | traceID |
| - (BOOL) moveTo: | (NSString *) | uid |
Seek to the specified position and prepare for playback.
Only playback by URL is supported.
| uid | The UID of the specified resource, which uniquely identifies a resource. |
| - (BOOL) moveTo: | (NSString *) | uid | |
| accId: | (NSString *) | accId | |
| accKey: | (NSString *) | accKey | |
| token: | (NSString *) | token | |
| region: | (NSString *) | region |
Seek to the specified resource and prepare for playback.
Only playback by STS is supported. You must update the STS information.
| uid | The UID of the specified resource, which uniquely identifies a resource. |
| accId | vid The AccessKey ID. |
| accKey | vid The AccessKey Secret. |
| token | vid The STS token. |
| region | vid The specified region. Default: cn-shanghai. |
| - (BOOL) moveTo: | (NSString *) | uid | |
| playAuth: | (NSString *) | playAuth |
Seek to the specified resource and prepare for playback.
Only playback by playauth is supported. You must update the playauth information.
| uid | The UID of the specified resource, which uniquely identifies a resource. |
| playAuth | vid The playAuth ID. |
| - (BOOL) moveToNext |
Seek to the next resource and prepare for playback.
Only playback by URL is supported.
| - (BOOL) moveToNext: | (NSString *) | playAuth |
Seek to the next resource and prepare for playback.
Only playback by playauth is supported. You must update the playauth information.
| playAuth | vid The playAuth ID. |
| - (BOOL) moveToNext: | (NSString *) | accId | |
| accKey: | (NSString *) | accKey | |
| token: | (NSString *) | token | |
| region: | (NSString *) | region |
Seek to the next resource and prepare for playback.
Only playback by STS is supported. You must update the STS information.
| accId | vid The AccessKey ID. |
| accKey | vid The AccessKey Secret. |
| token | vid The STS token. |
| region | vid The specified region. Default: cn-shanghai. |
| - (BOOL) moveToNextWithPrerendered |
Seek to the next resource and prepare for playback.
Only playback by URL is supported.
| - (BOOL) moveToNextWithPrerendered: | (NSString *) | playAuth |
Seek to the next resource and prepare for playback.
Only playback by playauth is supported. You must update the playauth information.
| playAuth | vid The playAuth ID. |
| - (BOOL) moveToNextWithPrerendered: | (NSString *) | accId | |
| accKey: | (NSString *) | accKey | |
| token: | (NSString *) | token | |
| region: | (NSString *) | region |
Seek to the next resource and prepare for playback.
Only playback by STS is supported. You must update the STS information.
| accId | vid The AccessKey ID. |
| accKey | vid The AccessKey Secret. |
| token | vid The STS token. |
| region | vid The specified region. Default: cn-shanghai. |
| - (BOOL) moveToPre |
Seek to the previous resource and prepare for playback.
Only playback by URL is supported.
| - (BOOL) moveToPre: | (NSString *) | playAuth |
Seek to the previous resource and prepare for playback.
Only playback by playauth is supported. You must update the playauth information.
| playAuth | vid The playAuth ID. |
| - (BOOL) moveToPre: | (NSString *) | accId | |
| accKey: | (NSString *) | accKey | |
| token: | (NSString *) | token | |
| region: | (NSString *) | region |
Seek to the previous resource and prepare for playback.
Only playback by STS is supported. You must update the STS information.
| accId | vid The AccessKey ID. |
| accKey | vid The AccessKey Secret. |
| token | vid The STS token. |
| region | vid The specified region. Default: cn-shanghai. |
| - (void) removeSource: | (NSString *) | uid |
Remove a resource from the playlist.
| uid | The UID of the resource, which uniquely identifies a resource. |
| - (void) SetMultiBitratesMode: | (AVPMultiBitratesMode) | mode |
SetMultiBitrate preload mode.
| mode | The MultiBitrate preload mode |
| - (void) setOption: | (PlayerOption) | key | |
| valueInt: | (int) | value |
Set player specific option (integer value).
Sets option parameters for specific player features. Some options accept integer-type values.
| key | Option key specifying the type of option to set |
| value | Integer representation of the option value |
Implements AliPlayer.
| - (void) setPreloadCount: | (int) | prevCount | |
| nextCount: | (int) | nextCount |
update set preload count
| prevCount | previous preload count |
| nextCount | next preload count |
| - (void) setScene: | (AVPSceneType) | type |
Set preload scene.
| type | scene type, see AVPSceneType |
| - (void) setStrategyParam: | (AVPStrategyType) | type | |
| strategyParam: | (NSString *) | strategyParam |
set strategy parameter.
| type | strategy type, see AVPStrategyType |
| strategyParam | strategy parameter, type is json string support param: algorithm, offset, scale for example: dynamic preload duration decrease strategy default strategy { "algorithm":"sub", "offset":"500" } transfer to string: "{\"algorithm\": \"div\",\"scale\": \"0.75\"}" or { "algorithm":"div", "scale":"0.75" } |
| - (void) stop |
Stop playback.
Stops the current playback. Status changes are notified via AVPDelegate::onPlayerStatusChanged. After stopping, player resources are not automatically released. Call destroy or destroyAsync.
Implements AliPlayer.
| - (void) updatePreloadConfig: | (AVPPreloadConfig *) | config |
update preload config related to uid
| uid | each URL is a unique UID |
| config | preload config, see AVPPreloadConfig |
| - (void) updatePreloadConfiguid: | (NSString *) | uid | |
| config: | (AVPPreloadConfig *) | config |
update preload config
| config | preload config, see AVPPreloadConfig |
|
readwritenonatomicassign |
Set the maximum preloading cache size.
Default: 100 MB. Minimum: 20 MB.
|
readwritenonatomiccopy |
|
readwritenonatomicassign |
Query or set the number of preloaded resources.
The number of resources before preloading and the number of resources after preloading are returned. Default: 2.
|
readwritenonatomiccopy |
Query or set the definition for playback by STS, such as LD or HD.
Call this method before moveTo. After the resources are preloaded, you cannot change the definition.