|
Agora RTC Objective-C API Reference
Refactor
|
Inherits <NSObject>.
Instance Methods | |
| (void) | - AgoraRtcMediaPlayer:didChangedToState:reason: |
| (void) | - AgoraRtcMediaPlayer:didChangedToPosition:atTimestamp: |
| (void) | - AgoraRtcMediaPlayer:didOccurEvent:elapsedTime:message: |
| (void) | - AgoraRtcMediaPlayer:didReceiveData:length: |
| (void) | - AgoraRtcMediaPlayer:didPlayBufferUpdated: |
| (void) | - AgoraRtcMediaPlayer:didPreloadEvent: |
| (void) | - AgoraRtcMediaPlayer:playerSrcInfoDidChange:from: |
| (void) | - AgoraRtcMediaPlayer:infoUpdated: |
| (void) | - AgoraRtcMediaPlayer:cacheStats: |
| (void) | - AgoraRtcMediaPlayer:playbackStats: |
| (void) | - onAgoraCDNTokenWillExpire |
| (void) | - AgoraRtcMediaPlayer:volumeIndicationDidReceive: |
|
optional |
Reports the changes of playback state.
When the state of the media player changes, the SDK triggers this callback to report the current playback state.
| playerKit | See AgoraRtcMediaPlayerProtocol. |
| state | The playback state. See AgoraMediaPlayerState. |
| reason | The reason for the changes in the media player status. See AgoraMediaPlayerReason. |
|
optional |
Reports current playback progress.
The callback occurs once every one second during the playback and reports current playback progress.
| playerKit | AgoraMediaPlayer |
| positionMs | Current playback progress (ms). |
| timestampMs | The NTP timestamp (ms) when the position is sent. |
|
optional |
Reports the player events.
seekToPosition: method, the SDK triggers the callback to report the results of the seek operation.| playerKit | See AgoraRtcMediaPlayerProtocol. |
| eventCode | The player event. See AgoraMediaPlayerEvent. |
| elapsedTime | The time (ms) when the event occurs. |
| message | Information about the event. |
|
optional |
Occurs when the media metadata is received.
The callback occurs when the player receives the media metadata and reports the detailed information of the media metadata.
| playerKit | See AgoraRtcMediaPlayerProtocol. |
| data | The detailed data of the media metadata. |
| length | The data length (bytes). |
|
optional |
Reports the playback duration that the buffered data can support.
When playing online media resources, the SDK triggers this callback every two seconds to report the playback duration that the currently buffered data can support.
AgoraMediaPlayerEventBufferLow (6).AgoraMediaPlayerEventBufferRecover (7).| playerKit | See AgoraRtcMediaPlayerProtocol. |
| playCachedBuffer | The playback duration (ms) that the buffered data can support. |
|
optional |
Reports the events of preloaded media resources.
| playerKit | See AgoraRtcMediaPlayerProtocol. |
| event | Events that occur when media resources are preloaded. See AgoraMediaPlayerPreloadEvent. |
|
optional |
Reports the playback progress of the media file.
When playing media files, the SDK triggers this callback every two second to report current playback progress.
| playerKit | See AgoraRtcMediaPlayerProtocol. |
| to | The media player source information after the change. See AgoraMediaPlayerSrcInfo. |
| from | The media player source information before the change. See AgoraMediaPlayerSrcInfo. |
|
optional |
Occurs when information related to the media player changes.
When the information about the media player changes, the SDK triggers this callback. You can use this callback for troubleshooting.
| playerKit | See AgoraRtcMediaPlayerProtocol. |
| info | Information related to the media player. See AgoraMediaPlayerUpdatedInfo. |
|
optional |
Reports the statistics of the media file being cached.
After you call the openWithMediaSource: method and set enableCache as YES, the SDK triggers this callback once per second to report the statistics of the media file being cached.
| info | The statistics of the media file being cached. See AgoraMediaPlayerCacheStatistics. |
| playerKit | The AgoraRtcMediaPlayerProtocol instance. |
|
optional |
Reports the statistics of the media file being played.
The SDK triggers this callback once per second to report the statistics of the media file being played.
| info | The statistics of the media file. See AgoraMediaPlayerPlaybackStats. |
| playerKit | The AgoraRtcMediaPlayerProtocol instance. |
|
optional |
AgoraCDN Token has expired and needs to be set up with renewAgoraCDNSrcToken(const char* src).
|
optional |
Reports the volume of the media player.
The SDK triggers this callback every 200 milliseconds to report the current volume of the media player.
| volume | The volume of the media player. The value ranges from 0 to 255. |
| playerKit | The AgoraRtcMediaPlayerProtocol instance. |