ByteRTCKTVManager class

Inheritance
  • Object
  • NativeClass
  • ByteRTCKTVManager

Constructors

ByteRTCKTVManager([NativeClassOptions? options])

Properties

$resource → NativeResource
no setterinherited
delegate FutureOr<ByteRTCKTVManagerDelegate?>
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
ready Future<void>
Whether the instance is initialized
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancelDownload(int downloadId) FutureOr<void>
@detail api @author lihuan.wuti2ha @brief 取消下载任务。 @param downloadId 下载任务 ID。
clearCache() FutureOr<void>
@detail api @author lihuan.wuti2ha @brief 清除当前音乐缓存文件,包括音乐音频和歌词。
destroy() → void
inherited
downloadLyric(NSString musicId, ByteRTCDownloadLyricType lyricType) FutureOr<int>
@detail api @author lihuan.wuti2ha @brief 下载歌词。 @param musicId 音乐 ID。 @param lyricType 歌词文件类型,参看 ByteRTCDownloadLyricType{@link #ByteRTCDownloadLyricType}。 @return 下载任务 ID。 @note - 若歌词下载成功,你会收到 ktvManager:onDownloadSuccess:downloadResult:{@link #ByteRTCKTVManagerDelegate#ktvManager:onDownloadSuccess:downloadResult} 回调。 - 若歌词下载失败,你会收到 ktvManager:onDownloadFailed:errorCode:{@link #ByteRTCKTVManagerDelegate#ktvManager:onDownloadFailed:errorCode} 回调。
downloadMidi(NSString musicId) FutureOr<int>
@detail api @author lihuan.wuti2ha @brief 下载 MIDI 文件。 @param musicId 音乐 ID。 @return 下载任务 ID。 @note - 若文件下载成功,你会收到 ktvManager:onDownloadSuccess:downloadResult:{@link #ByteRTCKTVManagerDelegate#ktvManager:onDownloadSuccess:downloadResult} 回调。 - 若文件下载失败,你会收到 ktvManager:onDownloadFailed:errorCode:{@link #ByteRTCKTVManagerDelegate#ktvManager:onDownloadFailed:errorCode} 回调。
downloadMusic(NSString musicId) FutureOr<int>
@detail api @author lihuan.wuti2ha @brief 下载音乐。 @param musicId 音乐 ID。 @return 下载任务 ID。 @note - 若音乐下载成功,你会收到 ktvManager:onDownloadSuccess:downloadResult:{@link #ByteRTCKTVManagerDelegate#ktvManager:onDownloadSuccess:downloadResult} 回调。 - 若音乐下载失败,你会收到 ktvManager:onDownloadFailed:errorCode:{@link #ByteRTCKTVManagerDelegate#ktvManager:onDownloadFailed:errorCode} 回调。 - 音乐下载进度更新时,你会收到 ktvManager:onDownloadMusicProgress:progress:{@link #ByteRTCKTVManagerDelegate#ktvManager:onDownloadMusicProgress:progress} 回调。
getHotMusic(NSArray<NSString> customHotlistId, ByteRTCMusicFilterType filterType) FutureOr<void>
@detail api @author lihuan.wuti2ha @brief 指定歌曲榜单,并获取其歌曲列表。 @param customHotlistId 榜单 ID 列表。
默认榜单 ID 有:ContentCenterProject,分别是火山内容中心热歌榜和项目热歌榜。如果你需要其他榜单,请联系技术支持人员。 @param filterType 歌曲过滤方式,参看 ByteRTCMusicFilterType{@link #ByteRTCMusicFilterType}。多个过滤方式可以按位或组合。 @note 调用接口后,你会收到 ktvManager:onHotMusicResult:errorCode:{@link #ByteRTCKTVManagerDelegate#ktvManager:onHotMusicResult:errorCode} 回调歌曲列表。
getKTVPlayer() FutureOr<ByteRTCKTVPlayer>
@detail api @author lihuan.wuti2ha @brief 获取 KTV 播放器。 @return KTV 播放器接口,参看 ByteRTCKTVPlayer{@link #ByteRTCKTVPlayer}。
getMusicDetail(NSString musicId) FutureOr<void>
@detail api @author lihuan.wuti2ha @brief 获取音乐详细信息。 @param musicId 音乐 ID。 @note 调用接口后,你会收到 ktvManager:onMusicDetailResult:errorCode:{@link #ByteRTCKTVManagerDelegate#ktvManager:onMusicDetailResult:errorCode} 回调。
getMusicList(int pageNumber, int pageSize, int filterType) FutureOr<void>
@detail api @author lihuan.wuti2ha @brief 获取歌曲列表。 @param pageNumber 页码,默认从 1 开始。 @param pageSize 每页显示歌曲的最大数量,取值范围 1,99。 @param filterType 歌曲过滤方式,参看 ByteRTCMusicFilterType{@link #ByteRTCMusicFilterType}。多个过滤方式可以按位或组合。 @note 调用接口后,你会收到 ktvManager:onMusicListResult:totalSize:errorCode:{@link #ByteRTCKTVManagerDelegate#ktvManager:onMusicListResult:totalSize:errorCode} 回调歌曲列表。
nativeCall<T>(String method, [List? args, NativeMethodMeta? meta]) Future<T>
Call instance method
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
searchMusic(NSString keyWord, int pageNumber, int pageSize, int filterType) FutureOr<void>
@detail api @author lihuan.wuti2ha @brief 根据关键词搜索歌曲。 @param keyWord 关键词,字符串长度最大为 20 个字符。 @param pageNumber 页码,默认从 1 开始。 @param pageSize 每页显示歌曲的最大数量,取值范围 1,99。 @param filterType 歌曲过滤方式,参看 ByteRTCMusicFilterType{@link #ByteRTCMusicFilterType}。多个过滤方式可以按位或组合。 @note 调用接口后,你会收到 ktvManager:onSearchMusicResult:totalSize:errorCode:{@link #ByteRTCKTVManagerDelegate#ktvManager:onSearchMusicResult:totalSize:errorCode} 回调歌曲列表。
sendInstanceGet<T>(String property) Future<T>
Get instance property
inherited
sendInstancePropertiesGet(dynamic nativeClass) Future<Map<String, dynamic>>
Get instance properties
inherited
sendInstanceSet(String property, dynamic value) Future<void>
Set instance property
inherited
setMaxCacheSize(int maxCacheSizeMB) FutureOr<void>
@detail api @author lihuan.wuti2ha @brief 设置歌曲文件最大占用的本地缓存。 @param maxCacheSizeMB 本地缓存,单位 MB。
设置值小于等于 0 时,使用默认值 1024 MB。
toString() String
A string representation of this object.
inherited
updateResource(NativeResource resource) → void
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

codegen_$namespace → dynamic
no setter