![]() |
AliyunPlayer v7.10.0
Aliyun Player API Reference Manual for iOS Platforms
|
#include "AVPDelegate.h"
Instance Methods | |
| (void) | - onBufferedPositionUpdate:position: |
| Current cache position callback. | |
| (void) | - onCaptureScreen:image: |
| Snapshot retrieval callback. | |
| (int) | - onChooseTrackIndex:info: |
| Select the stream to play. | |
| (void) | - onCurrentDownloadSpeed:speed: |
| current download speed callback. | |
| (void) | - onCurrentPositionUpdate:position: |
| Current playback position callback. | |
| (void) | - onCurrentUtcTimeUpdate:time: |
| Current playback utc time callback. | |
| (void) | - onError:errorModel: |
| Proxy error callback. | |
| (void) | - onGetThumbnailFailed: |
| Thumbnail image retrieval failure callback. | |
| (void) | - onGetThumbnailSuc:fromPos:toPos:image: |
| Thumbnail image retrieval success callback. | |
| (void) | - onLoadingProgress:progress: |
| Buffer progress callback, used to display Loading progress. | |
| (void) | - onLocalCacheLoaded:size: |
| Video playback cache hit callback. | |
| (void) | - onNetworkStat:stat: |
| Network stat information callback. | |
| (void) | - onPlayerEvent:eventType: |
| Player event callback. | |
| (void) | - onPlayerEvent:eventWithString:description: |
| Player event callback with string description. | |
| (void) | - onPlayerStatusChanged:oldStatus:newStatus: |
| Player status update callback. | |
| (void) | - onSEIData:type:uuid:data: |
| SEI callback. | |
| (void) | - onStreamSwitchedFail:URL:errorModel: |
| Stream switch by url fail callback. | |
| (void) | - onStreamSwitchedSuccess:URL: |
| Stream switch by url success callback. | |
| (void) | - onSubtitleExtAdded:trackIndex:URL: |
| External subtitles have been added. | |
| (void) | - onSubtitleHeader:trackIndex:Header: |
| Subtitle header information callback. | |
| (void) | - onSubtitleHide:trackIndex:subtitleID: |
| Hide subtitle callback. | |
| (void) | - onSubtitleShow:trackIndex:subtitleID:subtitle: |
| Show subtitle callback. | |
| (void) | - onSubTrackReady:info: |
| Sub-stream track information callback. | |
| (void) | - onTrackChanged:info: |
| Track switchover completion callback. | |
| (void) | - onTrackReady:info: |
| Track information callback. | |
| (void) | - onUrlExpired:expiredUrl:callback: |
| URL expired callback. | |
| (void) | - onURLSourceExpired:expiredSource:callback: |
| URL source expired callback. | |
| (void) | - onVidAuthExpired:expiredSource:callback: |
| VidAuth source expired callback. | |
| (void) | - onVideoRendered:timeMs:pts: |
| Player render info callback. | |
| (void) | - onVideoSizeChanged:width:height:rotation: |
| Video size change callback. | |
|
optionalrequired |
Current cache position callback.
| player | Player pointer. |
| position | Current cache position in milliseconds. Indicates the current buffered position, can be used to display buffer progress bar. The callback frequency can be adjusted via AVPConfig::positionTimerIntervalMs. |
|
optionalrequired |
Snapshot retrieval callback.
Triggered by Aliplayer::snapShot
| player | Player pointer. |
| image | Snapshot. For Mac platform, AVPImage is UIImage for iOS platform while it's NSImage for Mac platform. |
|
optionalrequired |
Select the stream to play.
| player | Player pointer. |
| info | An array of track information, including video, audio, subtitle tracks, etc. |
|
optionalrequired |
current download speed callback.
| player | Player pointer. |
| speed | Current download speed in bits per second. |
|
optionalrequired |
Current playback position callback.
| player | Player pointer. |
| position | Current playback position in milliseconds. Callback frequency: Default once per second, can be adjusted via configuration. |
|
optionalrequired |
Current playback utc time callback.
| player | Player pointer. |
| time | Current UTC time in milliseconds. Applicable to live streaming scenarios to get the UTC timestamp corresponding to the current playback content. |
|
optionalrequired |
Proxy error callback.
| player | Player pointer. |
| errorModel | Player error description. See AVPErrorModel. Triggered when errors occur during playback, including network errors, decoding errors, file errors, etc. |
|
optionalrequired |
Thumbnail image retrieval failure callback.
| positionMs | The specified thumbnail image position. Triggered after calling AliPlayer::getThumbnail fails. |
|
optionalrequired |
Thumbnail image retrieval success callback.
| positionMs | The specified thumbnail image position. |
| fromPos | The initial position of the thumbnail image. |
| toPos | The end position of the thumbnail image. |
| image | Thumbnail image pointer. Mac: NSImage. iOS: UIImage. Triggered after successfully calling AliPlayer::getThumbnail. |
|
optionalrequired |
Buffer progress callback, used to display Loading progress.
| player | Player pointer. |
| progress | Buffer progress: from 0 to 100, representing the percentage of buffer completion. |
|
optionalrequired |
Video playback cache hit callback.
| player | Player pointer. |
| size | File size, measured in bytes; a value greater than 0 indicates a cache hit, and the value represents the number of bytes hit the cache. Triggered when the player starts playback and uses a local cache file. |
|
optionalrequired |
Network stat information callback.
Currently only effective for Real-time Streaming(RTS)
| player | Player pointer. |
| stat | Network quality information, including packet loss rate, latency, etc. |
|
optional |
Player event callback.
| player | Player pointer. |
| eventType | Player event type. |
|
optionalrequired |
Player event callback with string description.
| player | Player pointer. |
| eventWithString | Player event type string. |
| description | Player event detailed description. |
|
optionalrequired |
Player status update callback.
| player | Player pointer. |
| oldStatus | The previous status. See AVPStatus. |
| newStatus | The updated status. See AVPStatus. Triggered when player status changes, including idle, prepared, started, paused, stopped, completed, error, etc. |
|
optionalrequired |
SEI callback.
| player | Player pointer. |
| type | Type. |
| uuid | Data.(valid only when type=5, added in player sdk 6.11.0 and later) |
| data | Data.(not included uuid part, the same semantic with player sdk 6.10.0 and before) Triggered when the decoder parses SEI data. |
|
optionalrequired |
Stream switch by url fail callback.
| player | Player pointer. |
| URL | Switched url. |
| errorModel | Player error description. See AVPErrorModel. Triggered after calling AliPlayer::switchStream fails. |
|
optionalrequired |
Stream switch by url success callback.
| player | Player pointer. |
| url | Switched url. Triggered after successfully calling AliPlayer::switchStream. Note: Only applicable to Aliyun live streaming addresses for multi-definition switching. |
|
optionalrequired |
External subtitles have been added.
| player | Player pointer. |
| trackIndex | Subtitle track index. |
| URL | subtitle url Triggered after successfully calling AliPlayer::addExtSubtitle. |
|
optionalrequired |
Subtitle header information callback.
Used for formats like ASS subtitles that require header information. If this callback is implemented, the player will not automatically render subtitles, and the caller needs to handle subtitle rendering.
| player | Player instance pointer |
| trackIndex | Subtitle track index |
| header | Subtitle header information content For external subtitle usage, refer to External Subtitles |
|
optionalrequired |
Hide subtitle callback.
| player | Player pointer. |
| trackIndex | Subtitle stream index. |
| subtitleID | Subtitle ID. Triggered when subtitles need to be hidden. |
|
optionalrequired |
Show subtitle callback.
| player | Player pointer. |
| trackIndex | Subtitle stream index. |
| subtitleID | Subtitle ID. |
| subtitle | Subtitle string. Triggered when subtitles need to be displayed. |
|
optionalrequired |
Sub-stream track information callback.
| player | Player pointer. |
| info | An array of sub-stream track information. Applicable to HLS packaged multi-bitrate streams. |
|
optionalrequired |
Track switchover completion callback.
| player | Player pointer. |
| info | Track switchover completion information. See AVPTrackInfo. Triggered after calling AliPlayer::selectTrack and the switch is completed. |
|
optionalrequired |
Track information callback.
| player | Player pointer. |
| info | An array of track information, including video, audio, subtitle tracks, etc. Triggered after prepare is completed and media information is obtained. |
|
optionalrequired |
URL expired callback.
| player | Player pointer. |
| expiredUrl | Expired URL. |
| callback | URL refresh callback. Triggered when the player detects that the URL has expired, can be used to implement automatic URL refresh functionality. |
|
optionalrequired |
URL source expired callback.
| player | Player pointer. |
| expiredSource | Expired URL source object. |
| callback | Source refresh callback. |
|
optionalrequired |
VidAuth source expired callback.
| player | Player pointer. |
| expiredSource | Expired VidAuth source object. |
| callback | Source refresh callback. |
|
optionalrequired |
Player render info callback.
| player | Player pointer. |
| timeMs | system time when render in milliseconds. |
| pts | video frame pts Triggered when each video frame rendering is completed, can be used for frame-level monitoring and performance analysis. |
|
optionalrequired |
Video size change callback.
| player | Player pointer. |
| width | Video width. |
| height | Video height. |
| rotation | Video rotate angle. Triggered when video metadata is loaded or video resolution changes. |