9 #import <Foundation/Foundation.h>
115 NS_ASSUME_NONNULL_BEGIN
139 @property (nonatomic, copy) NSString *chartName;
143 @property (nonatomic, assign) NSInteger identify;
150 @property (nonatomic, copy) NSString *resolution;
154 @property (nonatomic, copy) NSString *bandwidth;
164 @property(nonatomic, assign) NSInteger startTimeMs;
168 @property(nonatomic, assign) NSInteger endTimeMs;
174 __attribute__((visibility(
"default")))
@interface AgoraMusic : NSObject
187 @property(nonatomic, assign) NSInteger type;
193 @property(nonatomic, assign) NSInteger pitchType;
197 @property(nonatomic, copy) NSString* name;
201 @property(nonatomic, copy) NSString* singer;
205 @property(nonatomic, copy) NSString* poster;
210 @property(nonatomic, copy) NSString* releaseTime;
214 @property(nonatomic, assign) NSInteger durationS;
220 @property(nonatomic, strong) NSArray<NSNumber *>* lyricList;
224 @property(nonatomic, strong) NSArray<AgoraMvProperty *>* mvPropertyList;
228 @property(nonatomic, strong) NSArray<AgoraClimaxSegment *>* climaxSegmentList;
238 @property(nonatomic, assign) NSInteger count;
242 @property(nonatomic, assign) NSInteger total;
246 @property(nonatomic, assign) NSInteger page;
250 @property(nonatomic, assign) NSInteger pageSize;
255 @property(nonatomic, strong) NSArray<AgoraMusic *>* musicList;
329 - (void)onSongSimpleInfoResult:(NSString*)requestId songCode:(NSInteger)songCode simpleInfo:(NSString* _Nullable)simpleInfo reason:(
AgoraMusicContentCenterStateReason)reason;
364 @property (nonatomic, copy) NSString *appId;
372 @property (nonatomic, copy) NSString *token;
377 @property (nonatomic, assign) NSInteger mccUid;
381 @property (nonatomic, assign) NSUInteger maxCacheSize;
385 @property(nonatomic, copy) NSString* mccDomain;
389 @property(nonatomic, weak) id<AgoraMusicContentCenterEventDelegate> eventDelegate;
418 - (NSInteger)openMediaWithSongCode:(NSInteger)songCode startPos:(NSInteger)startPos NS_SWIFT_NAME(openMedia(
songCode:startPos:));
479 - (NSInteger)renewToken:(NSString * _Nonnull)token;
565 - (NSString *)getMusicCollectionWithMusicChartId:(NSInteger)musicChartId page:(NSInteger)page pageSize:(NSInteger)pageSize jsonOption:(NSString * _Nullable)jsonOption NS_SWIFT_NAME(getMusicCollection(musicChartId:page:pageSize:jsonOption:));
590 - (NSString *)searchMusicWithKeyWord:(NSString *)keyWord page:(NSInteger)page pageSize:(NSInteger)pageSize jsonOption:(NSString * _Nullable)jsonOption NS_SWIFT_NAME(searchMusic(keyWord:page:pageSize:jsonOption:));
630 - (NSInteger)preloadWithSongCode:(NSInteger)songCode jsonOption:(NSString* _Nullable)jsonOption NS_SWIFT_NAME(preload(
songCode:jsonOption:)) __attribute__((deprecated("Use preload(
songCode:) instead.")));
655 - (NSString *)preloadWithSongCode:(NSInteger)songCode NS_SWIFT_NAME(preload(
songCode:));
670 - (NSInteger)isPreloadedWithSongCode:(NSInteger)songCode NS_SWIFT_NAME(isPreloaded(
songCode:));
687 - (NSInteger)removeCacheWithSongCode:(NSInteger)songCode NS_SWIFT_NAME(removeCache(
songCode:));
731 - (NSInteger)getInternalSongCode:(NSInteger)songCode jsonOption:(NSString * _Nullable)jsonOption NS_SWIFT_NAME(getInternalSongCode(
songCode:jsonOption:));
748 - (NSString *)getLyricWithSongCode:(NSInteger)songCode lyricType:(NSInteger)lyricType NS_SWIFT_NAME(getLyric(
songCode:lyricType:));
769 - (NSString *)getSongSimpleInfoWithSongCode:(NSInteger)songCode NS_SWIFT_NAME(getSongSimpleInfo(
songCode:));
785 - (void)enableMainQueueDispatch:(BOOL)enabled;
797 #pragma mark - Unavailable Delegate Methods
799 - (void)onMusicChartsResult:(NSString *)requestId result:(NSArray<
AgoraMusicChartInfo*> *)result errorCode:(
AgoraMusicContentCenterStateReason)errorCode __attribute__((availability(ios,deprecated=7_0,message="Use onMusicChartsResult:result:statusCode: instead.")));
801 - (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.")));
802 - (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.")));
806 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
807 - (void)onMusicChartsResult:(NSString *)requestId result:(NSArray<
AgoraMusicChartInfo*> *)result errorCode:(
AgoraMusicContentCenterStateReason)errorCode __attribute__((availability(macos,deprecated=10_9,message="Use onMusicChartsResult:result:statusCode: instead.")));
808 - (void)onMusicCollectionResult:(NSString *)requestId result:(
AgoraMusicCollection *)result errorCode:(
AgoraMusicContentCenterStateReason)errorCode __attribute__((availability(macos,deprecated=10_9,message="Use onMusicCollectionResult:result:statusCode: instead.")));
809 - (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.")));
810 - (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.")));
811 - (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.")));
816 NS_ASSUME_NONNULL_END