终止下载

使用说明

客户端 Android iOS
支持说明 支持 支持
import { MDownloader } from "@yl/super-jssdk";

MDownloader.interruptDownload(optional)

参数说明

参数 类型 必填 作用
optional Object 必填参数

optional

参数 类型 必填 作用
queueId string 下载队列的id(通过下载队列的start回调取得)

返回说明

参数 类型 作用
resolve Function 完成回调
reject(err) Function 失败回调,err为详细错误信息,是一个json对象,例如:{"errCode":-1,"errMsg":"出错啦"}

代码示例

MDownloader.interruptDownload({queueId: '123'})
  .then() => {
    console.log("success", res);
  })
  .catch((err) => {
    console.log("fail", err);
  });

results matching ""

    No results matching ""