[DOCUMENTATION] Update documentation

This commit is contained in:
Axel Vencatareddy 2022-11-16 12:58:31 +01:00
parent ab5ff01129
commit c887ea1b78

80
API.md
View File

@ -263,11 +263,12 @@ var styles = StyleSheet.create({
```
### Configurable props
| Name |Plateforms Support |
|--|--|
| Name | Platforms Support |
|-------------------------------------------------------------------------------------|---------------------------|
| [adTagUrl](#adTagUrl) | Android, iOS |
| [allowsExternalPlayback](#allowsexternalplayback) | iOS |
| [audioOnly](#audioonly) | All |
|[automaticallyWaitsToMinimizeStalling](#automaticallyWaitsToMinimizeStalling) | iOS|\
| [automaticallyWaitsToMinimizeStalling](#automaticallyWaitsToMinimizeStalling) | iOS |
| [backBufferDurationMs](#backBufferDurationMs) | Android |
| [bufferConfig](#bufferconfig) | Android |
| [contentStartTime](#contentStartTime) | Android |
@ -315,8 +316,8 @@ var styles = StyleSheet.create({
### Event props
| Name |Plateforms Support |
|--|--|
| Name | Platforms Support |
|-------------------------------------------------------------------------------------------------|---------------------------|
| [onAudioBecomingNoisy](#onaudiobecomingnoisy) | Android, iOS |
| [onBandwidthUpdate](#onbandwidthupdate) | Android |
| [onBuffer](#onbuffer) | Android, iOS |
@ -328,12 +329,13 @@ var styles = StyleSheet.create({
| [onFullscreenPlayerDidDismiss](#onfullscreenplayerdiddismiss) | Android, iOS |
| [onLoad](#onload) | All |
| [onLoadStart](#onloadstart) | All |
|[onReadyForDisplay](#onreadyfordisplay)|Android, iOS, Web|
| [onPictureInPictureStatusChanged](#onpictureinpicturestatuschanged) | iOS |
| [onPlaybackRateChange](#onplaybackratechange) | All |
| [onProgress](#onprogress) | All |
|[onSeek](#onseek)|Android, iOS, Windows UWP|
| [onReadyForDisplay](#onreadyfordisplay) | Android, iOS, Web |
| [onReceiveAdEvent](#onReceiveAdEvent) | Android, iOS |
| [onRestoreUserInterfaceForPictureInPictureStop](#onrestoreuserinterfaceforpictureinpicturestop) | iOS |
| [onSeek](#onseek) | Android, iOS, Windows UWP |
| [onTimedMetadata](#ontimedmetadata) | Android, iOS |
@ -356,6 +358,16 @@ var styles = StyleSheet.create({
### Configurable props
#### adTagUrl
Sets the VAST uri to play AVOD ads.
Example:
```
adTagUrl="https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/vmap_ad_samples&sz=640x480&cust_params=sample_ar%3Dpremidpostoptimizedpodbumper&ciu_szs=300x250&gdfp_req=1&ad_rule=1&output=vmap&unviewed_position_start=1&env=vp&impl=s&cmsid=496&vid=short_onecue&correlator="
```
Platforms: Android, iOS
#### allowsExternalPlayback
Indicates whether the player allows switching to external playback mode such as AirPlay or HDMI.
* **true (default)** - allow switching to external playback mode
@ -1149,16 +1161,6 @@ Example:
Platforms: Android
#### onReadyForDisplay
Callback function that is called when the first video frame is ready for display. This is when the poster is removed.
Payload: none
* iOS: [readyForDisplay](https://developer.apple.com/documentation/avkit/avplayerviewcontroller/1615830-readyfordisplay?language=objc)
* Android [STATE_READY](https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/Player.html#STATE_READY)
Platforms: Android, iOS, Web
#### onPictureInPictureStatusChanged
Callback function that is called when picture in picture becomes active or inactive.
@ -1191,7 +1193,6 @@ Example:
Platforms: all
#### onProgress
Callback function that is called every progressUpdateInterval milliseconds with info about which position the media is currently playing.
@ -1212,6 +1213,41 @@ Example:
Platforms: all
#### onReadyForDisplay
Callback function that is called when the first video frame is ready for display. This is when the poster is removed.
Payload: none
* iOS: [readyForDisplay](https://developer.apple.com/documentation/avkit/avplayerviewcontroller/1615830-readyfordisplay?language=objc)
* Android [STATE_READY](https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/Player.html#STATE_READY)
Platforms: Android, iOS, Web
#### onReceiveAdEvent
Callback function that is called when an AdEvent is received from the IMA's SDK.
Payload:
| Property | Type | Description |
|----------|--------|-----------------------|
| event | string | The ad event received |
Example:
```
{
"event": "LOADED"
}
```
Platforms: Android, iOS
#### onRestoreUserInterfaceForPictureInPictureStop
Callback function that corresponds to Apple's [`restoreUserInterfaceForPictureInPictureStopWithCompletionHandler`](https://developer.apple.com/documentation/avkit/avpictureinpicturecontrollerdelegate/1614703-pictureinpicturecontroller?language=objc). Call `restoreUserInterfaceForPictureInPictureStopCompleted` inside of this function when done restoring the user interface.
Payload: none
Platforms: iOS
#### onSeek
Callback function that is called when a seek completes.
@ -1235,13 +1271,6 @@ Both the currentTime & seekTime are reported because the video player may not se
Platforms: Android, iOS, Windows UWP
#### onRestoreUserInterfaceForPictureInPictureStop
Callback function that corresponds to Apple's [`restoreUserInterfaceForPictureInPictureStopWithCompletionHandler`](https://developer.apple.com/documentation/avkit/avpictureinpicturecontrollerdelegate/1614703-pictureinpicturecontroller?language=objc). Call `restoreUserInterfaceForPictureInPictureStopCompleted` inside of this function when done restoring the user interface.
Payload: none
Platforms: iOS
#### onTimedMetadata
Callback function that is called when timed metadata becomes available
@ -1618,4 +1647,3 @@ allprojects {
}
```
If you encounter an error `Could not find com.android.support:support-annotations:27.0.0.` reinstall your Android Support Repository.