downloadMusic abstract method

CancelableOperation<DownloadResult> downloadMusic(
  1. String musicId,
  2. {void onReceiveProgress(
    1. int downloadProgress
    )?}
)

下载音乐

musicId:音乐 ID。
onReceiveProgress:音乐下载进度更新回调。设置后你会收到当前音乐文件的下载进度,单位 %,取值范围 0,100。

方法调用成功则收到 DownloadResult 对象;若调用失败,则返回失败原因,具体参看 KTVErrorCode。

Implementation

CancelableOperation<DownloadResult> downloadMusic(
  String musicId, {
  void Function(int downloadProgress)? onReceiveProgress,
});