feat: add onVolumeChange event (#3322)

* feat: implement `onVolumeChange` event
This commit is contained in:
Krzysztof Moch
2023-11-04 18:11:54 +01:00
committed by GitHub
parent 50e0b33bf6
commit cdbc856387
10 changed files with 71 additions and 1 deletions

View File

@@ -29,6 +29,7 @@ This page shows the list of available callbacks to handle player notifications
| [onTimedMetadata](#ontimedmetadata) | Android, iOS |
| [onTextTracks](#ontexttracks) | Android |
| [onVideoTracks](#onvideotracks) | Android |
| [onVolumeChange](#onvolumechange) | Android, iOS |
## Details
@@ -507,4 +508,23 @@ Example:
}
```
Platforms: Android
Platforms: Android
### `onVolumeChange`
Callback function that is called when the volume of player changes.
> Note: This event applies to the volume of the player, not the volume of the device.
Payload:
Property | Type | Description
--- | --- | ---
volume | number | The volume of the player (between 0 and 1)
Example:
```javascript
{
volume: 0.5
}
```
Platforms: Android, iOS