Agora RTC Objective-C API Reference  Refactor
Properties
AgoraMediaSource Class Reference

Inherits <NSObject>.

Properties

NSString *_Nullable url
 
NSString *_Nullable uri
 
NSUInteger startPos
 
BOOL autoPlay
 
BOOL enableCache
 
BOOL isAgoraSource
 
BOOL isLiveSource
 
AgoraRtcMediaPlayerCustomSourceOnReadCallback _Nonnull playerOnReadCallback
 

Property Documentation

◆ url

- (NSString* _Nullable) url
readwritenonatomiccopy

The URL of the media file that you want to play.

◆ uri

- (NSString* _Nullable) uri
readwritenonatomiccopy

The URI of the media file.

◆ startPos

- (NSUInteger) startPos
readwritenonatomicassign

Set the starting position for playback, in seconds (ms)

◆ autoPlay

- (BOOL) autoPlay
readwritenonatomicassign

Determines whether to autoplay after opening a media resource.

  • YES: (Default) Autoplay after opening a media resource.
  • NO: Do not autoplay after opening a media resource.

◆ enableCache

- (BOOL) enableCache
readwritenonatomicassign

Determines whether to enable cache streaming to local files. If enable cached, the media player will use the url or uri as the cache index.

  • YES: Enable cache.
  • NO: (Default) Disable cache.

◆ isAgoraSource

- (BOOL) isAgoraSource
readwritenonatomicassign

Determines whether the opened media resource is a stream through the Agora Broadcast Streaming Network(CDN).

  • YES: It is a stream through the Agora Broadcast Streaming Network.
  • NO: (Default) It is not a stream through the Agora Broadcast Streaming Network.

◆ isLiveSource

- (BOOL) isLiveSource
readwritenonatomicassign

Determines whether the opened media resource is a live stream. If is a live stream, it can speed up the opening of media resources.

  • YES: It is a live stream.
  • NO: (Default) It is not is a live stream.

◆ playerOnReadCallback

- (AgoraRtcMediaPlayerCustomSourceOnReadCallback _Nonnull) playerOnReadCallback
readwritenonatomiccopy

External custom data source callback

◆ playerOnSeekCallback

- (AgoraRtcMediaPlayerCustomSourceOnSeekCallback _Nonnull) playerOnSeekCallback
readwritenonatomiccopy