DownloadTask.offProgressUpdate

Requires:
BaseKit≥2.0.1
Platforms:
iOSAndroid

Method signature
DownloadTask.offProgressUpdate(listener: )
Minimum SDK versions
iOSThingSmartBaseKitBizBundle
≥ 5.2.1
Androidcom.thingclips.smart:thingsmart-bizbundle-basekit
≥ 5.2.0

Description

Stop listening for download progress change events

Parameters

ParameterTypeRequiredDescription
(params: ) => voidYesEvent listener callback function

Return Value

None

Examples

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

// Remove the progress listener: first get the download task handle via ty.downloadFile, then register and remove the progress listener on the handle.
const downloadTask = await downloadFile({
  url: "https://airtake-public-data-1254153901.cos.ap-shanghai.myqcloud.com/ttttestfile/test_video.mp4",
});

const handler = e => {
  console.log(e);
};
downloadTask.onProgressUpdate(handler);
downloadTask.offProgressUpdate(handler);