版权接口对象
More...
#import <NECopyrightedMedia.h>
◆ cancelPreloadSong:channel:
- (void) cancelPreloadSong: |
|
(NSString *) |
songId |
channel: |
|
(SongChannel) |
channel |
|
|
| |
◆ clearSongCache
◆ getHotSongList:hotDimension:channel:pageNum:pageSize:callback:
榜单歌曲查询
- Parameters
-
hotType | 热门类型 |
hotDimension | 场景类型 |
channel | 渠道 SongChannel: 可为空 |
pageNum | 页码 |
pageSize | 页面size 默认 20 |
callback | 回调 |
◆ getInstance
+ (instancetype) getInstance |
|
|
|
◆ getLyric:channel:
- (NSString *_Nullable) getLyric: |
|
(NSString *_Nonnull) |
songId |
channel: |
|
(SongChannel) |
channel |
|
|
| |
歌词
- Parameters
-
- Returns
- 歌词内容
◆ getPitch:channel:
- (NSString *_Nullable) getPitch: |
|
(NSString *_Nonnull) |
songId |
channel: |
|
(SongChannel) |
channel |
|
|
| |
打分
- Parameters
-
- Returns
- 打分内容
◆ getSongList:channel:pageNum:pageSize:callback:
- (void) getSongList: |
|
(NSArray< NSString * > *_Nullable) |
tags |
channel: |
|
(NSNumber *_Nullable) |
channel |
pageNum: |
|
(NSNumber *_Nullable) |
pageNum |
pageSize: |
|
(NSNumber *_Nullable) |
pageSize |
callback: |
|
(void(^)(NSArray< NECopyrightedSong * > *songList, NSError *error)) |
callback |
|
|
| |
歌曲列表
- Parameters
-
tags | 设置nil 预留字段 |
channel | 渠道 SongChannel: 可为空 |
pageNum | 页码 |
pageSize | 页面size 默认 20 |
callback | 回调 |
◆ getSongURI:channel:songResType:
- (NSString *_Nullable) getSongURI: |
|
(NSString *_Nonnull) |
songId |
channel: |
|
(SongChannel) |
channel |
songResType: |
|
(SongResType) |
songResType |
|
|
| |
原唱&伴奏:传给 NERtc 播放的 URI
- Parameters
-
songId | 音乐 ID |
channel | 渠道 |
songResType | 1:原唱,2:伴奏 |
- Returns
- 返回资源的本地路径
◆ hasInitialized
获取版权组件是否已经初始化
- Returns
- YES:已经初始化;NO 未初始化
◆ initialize:token:userUuid:extras:callback:
- (void) initialize: |
|
(NSString *_Nonnull) |
appkey |
token: |
|
(NSString *_Nonnull) |
token |
userUuid: |
|
(NSString *_Nullable) |
userUuid |
extras: |
|
(NSDictionary *_Nullable) |
extras |
callback: |
|
(void(^)(NSError *_Nullable error)) |
callback |
|
|
| |
初始化 NECopyrightedMedia
- Parameters
-
appkey | appkey |
token | token |
userUuid | userUuid |
extras | 填入Nil |
callback | 异步回调 NSError 为Nil 则成功 |
◆ isSongPreloaded:channel:
- (bool) isSongPreloaded: |
|
(NSString *) |
songId |
channel: |
|
(SongChannel) |
channel |
|
|
| |
检测是否已预加载 Song 数据
- Parameters
-
- Returns
- 是否已预加载
◆ preloadSong:channel:observe:
预加载 Song 数据
- Parameters
-
songId | 歌曲id |
channel | 渠道 |
observe | 观察者 |
◆ preloadSongLyric:channel:callback:
- (void) preloadSongLyric: |
|
(NSString *) |
songId |
channel: |
|
(SongChannel) |
channel |
callback: |
|
(void(^)(NSString *_Nullable content, NSString *_Nullable lyricType, NSError *_Nullable error)) |
callback |
|
|
| |
◆ renewToken:
- (void) renewToken: |
|
(NSString *) |
token |
|
◆ searchSong:channel:pageNum:pageSize:callback:
- (void) searchSong: |
|
(NSString *_Nullable) |
keyword |
channel: |
|
(NSNumber *_Nullable) |
channel |
pageNum: |
|
(NSNumber *_Nullable) |
pageNum |
pageSize: |
|
(NSNumber *_Nullable) |
pageSize |
callback: |
|
(void(^)(NSArray< NECopyrightedSong * > *_Nullable songList, NSError *_Nullable error)) |
callback |
|
|
| |
搜索歌曲
- Parameters
-
keyword | 搜索关键词 |
channel | 渠道 SongChannel: 可为空 |
pageNum | 页码 |
pageSize | 每页数据大小 |
callback | 回调 |
◆ setEventHandler:
◆ setSongScene:
设置获取资源场景
- Parameters
-
songScene | 场景枚举值,不同场景获取的资源不同 |
The documentation for this class was generated from the following file: