feat: add getCurrentPosition to component's ref (#3824)

* feat: add getCurrentPosition to component's ref
---------

Co-authored-by: mostafahasani <hasanie.mostafa@alopeyk.com>
This commit is contained in:
Seyed Mostafa Hasani
2024-05-28 02:00:38 -07:00
committed by GitHub
parent e23e02b359
commit c7f4d7b83b
8 changed files with 56 additions and 0 deletions

View File

@@ -100,6 +100,15 @@ tolerance is the max distance in milliseconds from the seconds position that's a
This function will change the volume exactly like [volume](./props#volume) property. default value and range are the same then.
### `getCurrentPosition`
<PlatformsList types={['Android', 'iOS']} />
`getCurrentPosition(): Promise<number>`
This function retrieves and returns the precise current position of the video playback, measured in seconds.
This function will throw an error if player is not initialized.
### Example Usage
```tsx