|
Agora RTC Objective-C API Reference
Refactor
|
Inherits <NSObject>.
Properties | |
| NSString *_Nullable | url |
| NSString *_Nullable | uri |
| NSUInteger | startPos |
| BOOL | autoPlay |
| BOOL | enableCache |
| BOOL | enableMultiAudioTrack |
| BOOL | isAgoraSource |
| BOOL | isLiveSource |
| AgoraRtcMediaPlayerCustomSourceOnReadCallback _Nonnull | playerOnReadCallback |
| AgoraRtcMediaPlayerCustomSourceOnSeekCallback _Nonnull | playerOnSeekCallback |
|
readwritenonatomiccopy |
The URL of the media file to be played.
url. If you open a custom media resource, pass in the value to playerOnReadCallback and playerOnSeekCallback. Agora recommends that you do not pass in values to all these parameters in one call; otherwise, this call may fail.
|
readwritenonatomiccopy |
The URI (Uniform Resource Identifier) of the media file.
|
readwritenonatomicassign |
The starting position (ms) for playback. The default value is 0.
|
readwritenonatomicassign |
Whether to enable autoplay once the media file is opened:
YES: (Default) Yes.NO: No. play method to play a media file after it is opened.
|
readwritenonatomicassign |
Whether to cache the media file when it is being played:
YES: Enables caching.NO: (Default) Disables caching. uri; otherwise, caching is based on the url of the media file.AgoraMediaPlayerCacheStatistics.
|
readwritenonatomicassign |
Whether to allow the selection of different audio tracks when playing this media file:
YES: Allow to select different audio tracks.NO: (Default) Do not allow to select different audio tracks. If you need to set different audio tracks for local playback and publishing to the channel, you need to set this parameter to YES, and then call the selectMultiAudioTrack:publishTrackIndex: method to select the audio track.
|
readwritenonatomicassign |
Whether the media resource to be opened is a live stream or on-demand video distributed through Media Broadcast service:
YES: The media resource to be played is a live or on-demand video distributed through Media Broadcast service.NO: (Default) The media resource is not a live stream or on-demand video distributed through Media Broadcast service. url, and set isAgoraSource as YES; otherwise, you don't need to set the isAgoraSource parameter.
|
readwritenonatomicassign |
Whether the media resource to be opened is a live stream:
YES: The media resource is a live stream.NO: (Default) The media resource is not a live stream. If the media resource you want to open is a live stream, Agora recommends that you set this parameter as YES so that the live stream can be loaded more quickly. isLiveSource as YES, the media resource is not to be loaded more quickly.
|
readwritenonatomiccopy |
Occurs when the SDK reads the media resource data. See AgoraRtcMediaPlayerCustomSourceOnReadCallback.
url. If you open a custom media resource, pass in the value to playerOnReadCallback and playerOnSeekCallback. Agora recommends that you do not pass in values to all these parameters in one call; otherwise, this call may fail.
|
readwritenonatomiccopy |
Occurs when the SDK seeks the media resource data. See AgoraRtcMediaPlayerCustomSourceOnSeekCallback.
url. If you open a custom media resource, pass in the value to playerOnReadCallback and playerOnSeekCallback. Agora recommends that you do not pass in values to all these parameters in one call; otherwise, this call may fail.