9 #import <Foundation/Foundation.h>
116 NS_ASSUME_NONNULL_BEGIN
134 @property (nonatomic, copy) NSString *chartName;
138 @property (nonatomic, assign) NSInteger identify;
145 @property (nonatomic, copy) NSString *resolution;
149 @property (nonatomic, copy) NSString *bandwidth;
156 @property(nonatomic, assign) NSInteger startTimeMs;
160 @property(nonatomic, assign) NSInteger endTimeMs;
166 __attribute__((visibility(
"default")))
@interface AgoraMusic : NSObject
181 @property(nonatomic, assign) NSInteger type;
187 @property(nonatomic, assign) NSInteger pitchType;
191 @property(nonatomic, copy) NSString* name;
195 @property(nonatomic, copy) NSString* singer;
199 @property(nonatomic, copy) NSString* poster;
204 @property(nonatomic, copy) NSString* releaseTime;
208 @property(nonatomic, assign) NSInteger durationS;
214 @property(nonatomic, strong) NSArray<NSNumber *>* lyricList;
218 @property(nonatomic, strong) NSArray<AgoraMvProperty *>* mvPropertyList;
222 @property(nonatomic, strong) NSArray<AgoraClimaxSegment *>* climaxSegmentList;
232 @property(nonatomic, assign) NSInteger count;
236 @property(nonatomic, assign) NSInteger total;
240 @property(nonatomic, assign) NSInteger page;
244 @property(nonatomic, assign) NSInteger pageSize;
248 @property(nonatomic, strong) NSArray<AgoraMusic *>* musicList;
291 - (void)onSongSimpleInfoResult:(NSString*)requestId songCode:(NSInteger)songCode simpleInfo:(NSString* _Nullable)simpleInfo reason:(
AgoraMusicContentCenterStateReason)reason;
313 @property (nonatomic, copy) NSString *appId;
317 @property (nonatomic, copy) NSString *token;
321 @property (nonatomic, assign) NSInteger mccUid;
325 @property (nonatomic, assign) NSUInteger maxCacheSize;
329 @property(nonatomic, copy) NSString* mccDomain;
333 @property(nonatomic, weak) id<AgoraMusicContentCenterEventDelegate> eventDelegate;
346 - (NSInteger)openMediaWithSongCode:(NSInteger)songCode startPos:(NSInteger)startPos NS_SWIFT_NAME(openMedia(
songCode:startPos:));
380 - (NSInteger)renewToken:(NSString * _Nonnull)token;
429 - (NSString *)getMusicCollectionWithMusicChartId:(NSInteger)musicChartId page:(NSInteger)page pageSize:(NSInteger)pageSize jsonOption:(NSString * _Nullable)jsonOption NS_SWIFT_NAME(getMusicCollection(musicChartId:page:pageSize:jsonOption:));
440 - (NSString *)searchMusicWithKeyWord:(NSString *)keyWord page:(NSInteger)page pageSize:(NSInteger)pageSize jsonOption:(NSString * _Nullable)jsonOption NS_SWIFT_NAME(searchMusic(keyWord:page:pageSize:jsonOption:));
452 - (NSInteger)preloadWithSongCode:(NSInteger)songCode jsonOption:(NSString* _Nullable)jsonOption NS_SWIFT_NAME(preload(
songCode:jsonOption:)) __attribute__((deprecated("Use preload(
songCode:) instead.")));
460 - (NSString *)preloadWithSongCode:(NSInteger)songCode NS_SWIFT_NAME(preload(
songCode:));
470 - (NSInteger)isPreloadedWithSongCode:(NSInteger)songCode NS_SWIFT_NAME(isPreloaded(
songCode:));
480 - (NSInteger)removeCacheWithSongCode:(NSInteger)songCode NS_SWIFT_NAME(removeCache(
songCode:));
498 - (NSInteger)getInternalSongCode:(NSInteger)songCode jsonOption:(NSString * _Nullable)jsonOption NS_SWIFT_NAME(getInternalSongCode(
songCode:jsonOption:));
507 - (NSString *)getLyricWithSongCode:(NSInteger)songCode lyricType:(NSInteger)lyricType NS_SWIFT_NAME(getLyric(
songCode:lyricType:));
515 - (NSString *)getSongSimpleInfoWithSongCode:(NSInteger)songCode NS_SWIFT_NAME(getSongSimpleInfo(
songCode:));
522 - (void)enableMainQueueDispatch:(BOOL)enabled;
532 #pragma mark - Unavailable Delegate Methods
534 - (void)onMusicChartsResult:(NSString *)requestId result:(NSArray<
AgoraMusicChartInfo*> *)result errorCode:(
AgoraMusicContentCenterStateReason)errorCode __attribute__((availability(ios,deprecated=7_0,message="Use onMusicChartsResult:result:statusCode: instead.")));
536 - (void)onLyricResult:(NSString*)requestId songCode:(NSInteger)songCode lyricUrl:(NSString* _Nullable)lyricUrl errorCode:(
AgoraMusicContentCenterStateReason)errorCode __attribute__((availability(ios,deprecated=7_0,message="Use onLyricResult:
songCode:lyricUrl:statusCode: instead.")));
537 - (void)onSongSimpleInfoResult:(NSString*)requestId songCode:(NSInteger)songCode simpleInfo:(NSString* _Nullable)simpleInfo errorCode:(
AgoraMusicContentCenterStateReason)errorCode __attribute__((availability(ios,deprecated=7_0,message="Use onSongSimpleInfoResult:
songCode:simpleInfo:statusCode: instead.")));
541 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
542 - (void)onMusicChartsResult:(NSString *)requestId result:(NSArray<
AgoraMusicChartInfo*> *)result errorCode:(
AgoraMusicContentCenterStateReason)errorCode __attribute__((availability(macos,deprecated=10_9,message="Use onMusicChartsResult:result:statusCode: instead.")));
543 - (void)onMusicCollectionResult:(NSString *)requestId result:(
AgoraMusicCollection *)result errorCode:(
AgoraMusicContentCenterStateReason)errorCode __attribute__((availability(macos,deprecated=10_9,message="Use onMusicCollectionResult:result:statusCode: instead.")));
544 - (void)onLyricResult:(NSString*)requestId songCode:(NSInteger)songCode lyricUrl:(NSString* _Nullable)lyricUrl errorCode:(
AgoraMusicContentCenterStateReason)errorCode __attribute__((availability(macos,deprecated=10_9,message="Use onLyricResult:
songCode:lyricUrl:statusCode: instead.")));
545 - (void)onSongSimpleInfoResult:(NSString*)requestId songCode:(NSInteger)songCode simpleInfo:(NSString* _Nullable)simpleInfo errorCode:(
AgoraMusicContentCenterStateReason)errorCode __attribute__((availability(macos,deprecated=10_9,message="Use onSongSimpleInfoResult:
songCode:simpleInfo:statusCode: instead.")));
546 - (void)onPreLoadEvent:(NSString*)requestId songCode:(NSInteger)songCode percent:(NSInteger)percent lyricUrl:(NSString * _Nullable)lyricUrl state:(
AgoraMusicContentCenterPreloadState)state errorCode:(
AgoraMusicContentCenterStateReason)errorCode __attribute__((availability(macos,deprecated=10_9,message="Use onPreLoadEvent:
songCode:percent:lyricUrl:status:statusCode: instead.")));
551 NS_ASSUME_NONNULL_END