---
name: "onDownloadTotalProgressUpdate"
mode: "kit"
versionRequirements:
  - { name: "P2PKit", version: "1.0.0" }
  - { name: "@ray-js/ray", version: "1.3.15" }
platform:
  - "iOS"
  - "Android"
async: true
title: "p2p.onDownloadTotalProgressUpdate - Total download progress callback"
---

## onDownloadTotalProgressUpdate

> [VERSION] P2PKit >= 1.0.0 | @ray-js/ray >= 1.3.15

> [PLATFORM] iOS, Android

> ⚡ **Supports Promise** — Returns a Promise when success / fail / complete callbacks are omitted.

### Description

Total download progress event

### Parameters

`(listener: Function)`

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `listener` | `(params: DownloadTotalProgressEvent) => void` | Yes | - |  |

### Referenced Types

##### `interface` DownloadTotalProgressEvent

| Property | Type | Since | Description |
| --- | --- | --- | --- |
| `deviceId` | `string` | `1.0.0` | Device ID |
| `progress` | `number` | `1.0.0` | Upload/download progress |


### Examples

#### Demo

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

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