onFileDownloadComplete(listener: Function)

版本要求:
P2PKit≥1.0.0@ray-js/ray≥1.3.15
支持平台:
iOSAndroid
import { p2p } from '@ray-js/ray';

const { onFileDownloadComplete } = p2p;

// Promise 调用
try {
  const res = await onFileDownloadComplete({ ...params });
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

描述

single file download completed event

参数

参数类型必填说明
是

返回值

无

示例代码

import { p2p } from '@ray-js/ray'

p2p.onFileDownloadComplete(e => {
  console.log(e);
});