![]() |
AliyunPlayer
v5.4.6.0
Aliyun Player API Reference Manual for iOS Platforms
|
Instance Methods | |
| (void) | - addExtSubtitle: |
| Add external subtitles. More... | |
| (void) | - clearScreen |
| Clear screen. More... | |
| (void) | - DEPRECATED_ATTRIBUTE |
| Reset. More... | |
| ("will not take effect") | - DEPRECATED_MSG_ATTRIBUTE |
| Refresh the view in certain situations, for example, when the size of the view changes. More... | |
| (void) | - destroy |
| Delete the player. More... | |
| (NSString *) | - getCacheFilePath: |
| Query the name of the cached file with the specified URL. More... | |
| (NSString *) | - getCacheFilePath:format:definition: |
| Query the name of the cached file with the specified URL. More... | |
| (NSString *) | - getCacheFilePath:format:definition:previewTime: |
| Query the name of the cached file with the specified URL. More... | |
| (AVPConfig *) | - getConfig |
| Query player configuration. More... | |
| (AVPTrackInfo *) | - getCurrentTrack: |
| Query the track that is being played. More... | |
| (AVPMediaInfo *) | - getMediaInfo |
| Query media information, including track information. More... | |
| (NSString *) | - getOption: |
| Get player information. More... | |
| (void *) | - getPlayer |
| (NSString *) | - getPlayerName |
| Get used player name. More... | |
| (NSString *) | - getPropertyString: |
| Get information by key. More... | |
| (void) | - getThumbnail: |
| Retrieve the thumbnail image at the specified position. More... | |
| (instancetype) | - init |
| Initialize the player. More... | |
| (instancetype) | - init: |
| Initialize the player. More... | |
| (int) | - invokeComponent: |
| Send command to component. More... | |
| (void) | - pause |
| Pause. More... | |
| (void) | - prepare |
| Prepare for playback. More... | |
| (void) | - reload |
| Reload resources. More... | |
| (void) | - seekToTime:seekMode: |
| Seek to a specified position. More... | |
| (void) | - selectExtSubtitle:enable: |
| Select external subtitles. More... | |
| (void) | - selectTrack: |
| Switch definition according to the specified track index. More... | |
| (void) | - selectTrack:accurate: |
| Switch definition according to the specified track index. More... | |
| (void) | - sendCustomEvent: |
| Send custom event, will callback through AVPEventReportParamsDelegate. More... | |
| (void) | - setAuthSource: |
| Play by VID and playauth. More... | |
| (void) | - setBitStreamSource: |
| Play by bit stream. More... | |
| (BOOL) | - setCacheConfig: |
| Modify cache configuration. More... | |
| (void) | - setConfig: |
| Modify player configuration. More... | |
| (void) | - setDefaultBandWidth: |
| Set the default playback bitrate for multi-bit rate. More... | |
| (void) | - setEventReportParamsDelegate: |
| Set a proxy. More... | |
| (void) | - setFilterConfig: |
| Set filter config. More... | |
| (void) | - setFilterInvalid:invalid: |
| disable/enable filter. More... | |
| (void) | - setLiveStsSource: |
| Play by 使用LiveSts. More... | |
| (void) | - setMaxAccurateSeekDelta: |
| set the maximum interval of precision seek. More... | |
| (void) | - setMpsSource: |
| Play by VID and MPS. More... | |
| (void) | - setPlayUrlConvertCallback: |
| Set a URL conversion callback. More... | |
| (void) | - setPreferPlayerName: |
| Set preper player name. More... | |
| (void) | - setStreamDelayTime:time: |
| set the delay time of the stream More... | |
| (void) | - setStsSource: |
| Play by VID and STS. More... | |
| (void) | - setThumbnailUrl: |
| Specify a thumbnail image URL. More... | |
| (void) | - setTraceID: |
| Set a trace ID for debugging. More... | |
| (void) | - setUrlSource: |
| Play by URL. More... | |
| (void) | - setVerifyStsCallback: |
| Set the AVPStsInfo expiration callback. More... | |
| (void) | - setVideoTag:size: |
| Set the video tags. More... | |
| (void) | - snapShot |
| Snapshot. More... | |
| (void) | - start |
| Start playing. More... | |
| (void) | - stop |
| Stop. More... | |
| (void) | - updateFilterConfig:options: |
| upadate filter config. More... | |
| (void) | - updateLiveStsInfo:accKey:token:region: |
| update liveSts info. More... | |
Class Methods | |
| (NSString *) | + getDeviceUUID |
| Query device UUID. More... | |
| (NSString *) | + getSDKVersion |
| Query the SDK version. More... | |
| (void) | + initPlayerComponent:function: |
| Initialize player components. More... | |
| (void) | + netWorkReConnect |
| reconnect all connections, call this when netWork router changed, and the player will use new router. More... | |
| (void) | + setAudioSessionDelegate: |
| Set AudioSession Delegate. More... | |
| (void) | + setEnableLog: |
| Enable or disable logging. More... | |
| (void) | + setLogCallbackInfo:callbackBlock: |
| Set a log output callback block. More... | |
Properties | |
| id< CicadaRenderDelegate > renderDelegate | __deprecated |
| Set the render callback. More... | |
| BOOL | autoPlay |
| Enable or disable autoplay. More... | |
| int64_t | bufferedPosition |
| Query the buffered position. More... | |
| int64_t | currentDownloadSpeed |
| Query the current download speed. More... | |
| int64_t | currentPosition |
| Query the current playback position. More... | |
| int64_t | currentUtcTime |
| Query the current playback utc time. More... | |
| id< AVPDelegate > | delegate |
| Set a proxy. More... | |
| int64_t | duration |
| Query the length of the video. More... | |
| BOOL | enableHardwareDecoder |
| Enable or disable hardware decoding. More... | |
| id< AVPEventReportParamsDelegate > | eventReportParamsDelegate |
| Set the event report callback. More... | |
| int | height |
| Query the height of the video. More... | |
| int64_t | localCacheLoadedSize |
| Query the current playback cached file size. More... | |
| BOOL | loop |
| Enable or disable loop playback. More... | |
| AVPMirrorMode | mirrorMode |
| Set a mirroring mode. More... | |
| BOOL | muted |
| Mute or unmute the player. More... | |
| AVPView * | playerView |
| Set a player view (playerView). More... | |
| float | rate |
| Set the playback speed. More... | |
| id< CicadaRenderingDelegate > | renderingDelegate |
| Set the render callback. More... | |
| AVPRotateMode | rotateMode |
| Set a rotate mode. More... | |
| int | rotation |
| Query the rotate angle of the video, which is retrieved from the video metadata. More... | |
| AVPScalingMode | scalingMode |
| Set a zoom mode. More... | |
| float | volume |
| Query or set the volume of the player(Not system volume). More... | |
| int | width |
| Query the width of the video. More... | |
| - (void) addExtSubtitle: | (NSString *) | URL |
Add external subtitles.
| URL | subtitle address |
| - (void) clearScreen |
Clear screen.
| - (void) DEPRECATED_ATTRIBUTE |
Reset.
| - ("will not take effect") DEPRECATED_MSG_ATTRIBUTE |
Refresh the view in certain situations, for example, when the size of the view changes.
| - (void) destroy |
Delete the player.
Implemented in AliListPlayer.
| - (NSString *) getCacheFilePath: | (NSString *) | URL |
Query the name of the cached file with the specified URL.
If a custom rule is set, delegate onGetCacheNameByURL.
If the delegation failed, the default logic is used to generate the file name.
| URL | The URL of the cached file. |
| - (NSString *) getCacheFilePath: | (NSString *) | vid | |
| format: | (NSString *) | format | |
| definition: | (NSString *) | definition | |
Query the name of the cached file with the specified URL.
If a custom rule is set, delegate onCacheNameByVidCallback.
If the delegation failed, the default logic is used to generate the file name.
| vid | The VID of the video. |
| format | The format of the video. |
| definition | The definition of the video. |
| - (NSString *) getCacheFilePath: | (NSString *) | vid | |
| format: | (NSString *) | format | |
| definition: | (NSString *) | definition | |
| previewTime: | (int) | previewTime | |
Query the name of the cached file with the specified URL.
If a custom rule is set, delegate onCacheNameByVidCallback.
If the delegation failed, the default logic is used to generate the file name.
| 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. |
| - (AVPTrackInfo*) getCurrentTrack: | (AVPTrackType) | type |
| + (NSString *) getDeviceUUID |
Query device UUID.
| - (AVPMediaInfo*) getMediaInfo |
Query media information, including track information.
| - (NSString *) getOption: | (AVPOption) | key |
Get player information.
| key | The key |
| - (void *) getPlayer |
| - (NSString *) getPlayerName |
Get used player name.
| - (NSString *) getPropertyString: | (AVPPropertyKey) | key |
Get information by key.
| key | The enum of key |
| + (NSString*) getSDKVersion |
Query the SDK version.
| - (void) getThumbnail: | (int64_t) | positionMs |
Retrieve the thumbnail image at the specified position.
| positionMs | The specified position. |
| - (instancetype) init |
Initialize the player.
Implemented in AliListPlayer.
| - (instancetype) init: | (NSString *) | traceID |
Initialize the player.
| traceID | A trace ID for debugging. Set as "DisableAnalytics" to disable report analytics data to server(not recommended). |
Implemented in AliListPlayer.
| + (void) initPlayerComponent: | (NSString *) | functionName | |
| function: | (void *) | function | |
Initialize player components.
These components are optional. You can remove these components by deleting the dynamic libraries and code of the components on your app.
| - (int) invokeComponent: | (NSString *) | content |
Send command to component.
| content | command content |
| + (void) netWorkReConnect |
reconnect all connections, call this when netWork router changed, and the player will use new router.
| - (void) pause |
Pause.
| - (void) prepare |
Prepare for playback.
Asynchronous callback.
| - (void) reload |
Reload resources.
You can reload resources when the network connection times out.
| - (void) seekToTime: | (int64_t) | time | |
| seekMode: | (AVPSeekMode) | seekMode | |
Seek to a specified position.
| time | The specified position that the player will seek to, Unit: millisecond. |
| seekMode | Seek mode. |
| - (void) selectExtSubtitle: | (int) | trackIndex | |
| enable: | (BOOL) | enable | |
Select external subtitles.
| trackIndex | caption index |
| enable | true: select, false: close |
| - (void) selectTrack: | (int) | trackIndex |
Switch definition according to the specified track index.
| trackIndex | Specify a definition index. SELECT_AVPTRACK_TYPE_VIDEO_AUTO: auto bitrate adjustment. |
| - (void) selectTrack: | (int) | trackIndex | |
| accurate: | (BOOL) | accurate | |
Switch definition according to the specified track index.
| trackIndex | Specify a definition index. SELECT_AVPTRACK_TYPE_VIDEO_AUTO: auto bitrate adjustment. |
| accurate | Use accurate seeking to select track。 |
| - (void) sendCustomEvent: | (NSString *) | args |
Send custom event, will callback through AVPEventReportParamsDelegate.
Event id e = 5001.
| + (void) setAudioSessionDelegate: | (id< CicadaAudioSessionDelegate >) | delegate |
Set AudioSession Delegate.
| delegate | the Delegate |
| - (void) setAuthSource: | (AVPVidAuthSource *) | source |
Play by VID and playauth.
See https://help.aliyun.com/document_detail/57294.html
| source | AVPVidAuthSource type. |
| - (void) setBitStreamSource: | (AVPBitStreamSource *) | source |
| - (BOOL) setCacheConfig: | (AVPCacheConfig *) | cacheConfig |
Modify cache configuration.
| AVPCacheConfig | Cache configuration. AVPCacheConfig. |
| - (void) setConfig: | (AVPConfig *) | config |
| - (void) setDefaultBandWidth: | (int) | bandWidth |
Set the default playback bitrate for multi-bit rate.
The nearest stream will be selected.
| bandWidth | bit rate . |
| + (void) setEnableLog: | (BOOL) | enableLog |
Enable or disable logging.
| enableLog | set as true to output log |
| - (void) setEventReportParamsDelegate: | (id< AVPEventReportParamsDelegate >) | delegate |
| - (void) setFilterConfig: | (AVPFilterConfig *) | filterConfig |
Set filter config.
call this before prepare. If want update filter config, call updateFilterConfig()
| filterConfig |
| - (void) setFilterInvalid: | (NSString *) | target | |
| invalid: | (BOOL) | invalid | |
disable/enable filter.
| target | if empty , disable all filters. |
| invalid | true: enable(default); false: disable |
| - (void) setLiveStsSource: | (AVPLiveStsSource *) | source |
Play by 使用LiveSts.
| source | AVPLiveStsSource type. |
| + (void) setLogCallbackInfo: | (AVPLogLevel) | logLevel | |
| callbackBlock: | (void(^)(AVPLogLevel logLevel, NSString *strLog)) | block | |
Set a log output callback block.
Asynchronous.
| logLevel | The level of the log. |
| callbackBlock | Log output callback block, which can be nil. |
| - (void) setMaxAccurateSeekDelta: | (int) | delta |
set the maximum interval of precision seek.
| delta | interval in milliseconds |
| - (void) setMpsSource: | (AVPVidMpsSource *) | source |
Play by VID and MPS.
See https://help.aliyun.com/document_detail/53522.html?spm=5176.doc53534.2.5.mhSfOh
| source | AVPVidMpsSource type. |
| - (void) setPlayUrlConvertCallback: | (PlayURLConverCallback) | callback |
Set a URL conversion callback.
URL conversion is typically used in P2P broadcasting.
| callback | The function pointer of the callback. |
| - (void) setPreferPlayerName: | (NSString *) | name |
Set preper player name.
| name | preper player name. |
| - (void) setStreamDelayTime: | (int) | index | |
| time: | (int) | time | |
set the delay time of the stream
| index | steam index |
| time | ms |
| - (void) setStsSource: | (AVPVidStsSource *) | source |
Play by VID and STS.
For STS, see https://help.aliyun.com/document_detail/28756.html?spm=a2c4g.11186623.4.4.6f554c07q7B7aS
| source | AVPVidStsSource type. |
| - (void) setThumbnailUrl: | (NSString *) | URL |
Specify a thumbnail image URL.
| URL | The specified thumbnail image URL. |
| - (void) setTraceID: | (NSString *) | traceID |
Set a trace ID for debugging.
| traceID | The specified client connection trace ID. |
| - (void) setUrlSource: | (AVPUrlSource *) | source |
| - (void) setVerifyStsCallback: | (AVPStsStatus(^)(AVPStsInfo info)) | callback |
Set the AVPStsInfo expiration callback.
| callback |
| - (void) setVideoTag: | (int *) | tags | |
| size: | (int) | size | |
Set the video tags.
Values range from [0,99].
| - (void) snapShot |
Snapshot.
AVPImage: For a Mac platform, NSImage is returned. For an iOS platform, UIImage is returned.
| - (void) start |
Start playing.
Implemented in AVPLiveTimeShift.
| - (void) stop |
Stop.
Implemented in AVPLiveTimeShift, and AliListPlayer.
| - (void) updateFilterConfig: | (NSString *) | target | |
| options: | (AVPFilterOptions *) | options | |
upadate filter config.
| target | |
| options |
| - (void) updateLiveStsInfo: | (NSString *) | accId | |
| accKey: | (NSString *) | accKey | |
| token: | (NSString *) | token | |
| region: | (NSString *) | region | |
update liveSts info.
|
readwritenonatomicweak |
Set the render callback.
Deprecated, use the renderingDelegate.
|
readwritenonatomicassign |
Enable or disable autoplay.
KVO is supported.
|
readnonatomicassign |
Query the buffered position.
KVO is supported.
|
readnonatomicassign |
Query the current download speed.
KVO is supported.
|
readnonatomicassign |
Query the current playback position.
KVO is supported.
|
readnonatomicassign |
Query the current playback utc time.
KVO is supported.
|
readwritenonatomicweak |
|
readnonatomicassign |
Query the length of the video.
KVO is supported.
|
readwritenonatomicassign |
Enable or disable hardware decoding.
KVO is supported.
|
readwritenonatomicweak |
Set the event report callback.
|
readnonatomicassign |
Query the height of the video.
KVO is supported.
|
readnonatomicassign |
Query the current playback cached file size.
KVO is supported.
|
readwritenonatomicassign |
Enable or disable loop playback.
KVO is supported.
|
readwritenonatomicassign |
|
readwritenonatomicassign |
Mute or unmute the player.
KVO is supported.
|
readwritenonatomicstrong |
Set a player view (playerView).
AVPView: Mac platform: NSOpenGLView. iOS platform: UIView.
|
readwritenonatomicassign |
Set the playback speed.
Valid values: 0.5 to 2.0. Value 1 indicates normal speed. KVO is supported.
|
readwritenonatomicweak |
Set the render callback.
|
readwritenonatomicassign |
|
readnonatomicassign |
Query the rotate angle of the video, which is retrieved from the video metadata.
KVO is supported.
|
readwritenonatomicassign |
|
readwritenonatomicassign |
Query or set the volume of the player(Not system volume).
KVO is supported. The range is 0.0~2.0,it maybe lead to noise if set volume more then 1.0, not recommended.
|
readnonatomicassign |
Query the width of the video.
KVO is supported.