Agora RTC Objective-C API Reference  Refactor
Instance Methods
<AgoraMusicPlayerProtocol> Protocol Reference

Inherits <NSObjectAgoraRtcMediaPlayerProtocol>.

Instance Methods

(NSInteger) - openMediaWithSongCode:startPos:
 

Method Documentation

◆ openMediaWithSongCode:startPos:

- (NSInteger) openMediaWithSongCode: (NSInteger)  songCode
startPos: (NSInteger)  startPos 

Open a media file with specified parameters.

Parameters
songCodeThe identifier of the media file that you want to play.
startPosThe playback position (ms) of the music file.
Returns
  • 0: Success.
  • < 0: Failure.