Merge branch 'master' into master

This commit is contained in:
Olivier Bouillet 2022-12-09 22:15:55 +01:00 committed by GitHub
commit 92fe61acb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 4 deletions

15
API.md
View File

@ -316,12 +316,14 @@ var styles = StyleSheet.create({
### Event props ### Event props
| Name | Platforms Support | | Name | Platforms Support |
|-------------------------------------------------------------------------------------------------|---------------------------| |-------------------------------------------------------------------------------------------------|---------------------------|
| [onAudioBecomingNoisy](#onaudiobecomingnoisy) | Android, iOS | | [onAudioBecomingNoisy](#onaudiobecomingnoisy) | Android, iOS |
| [onBandwidthUpdate](#onbandwidthupdate) | Android | | [onBandwidthUpdate](#onbandwidthupdate) | Android |
| [onBuffer](#onbuffer) | Android, iOS | | [onBuffer](#onbuffer) | Android, iOS |
| [onEnd](#onend) | All | | [onEnd](#onend) | All |
| [onError](#onerror) | Android, iOS |
| [onExternalPlaybackChange](#onexternalplaybackchange) | iOS | | [onExternalPlaybackChange](#onexternalplaybackchange) | iOS |
| [onFullscreenPlayerWillPresent](#onfullscreenplayerwillpresent) | Android, iOS | | [onFullscreenPlayerWillPresent](#onfullscreenplayerwillpresent) | Android, iOS |
| [onFullscreenPlayerDidPresent](#onfullscreenplayerdidpresent) | Android, iOS | | [onFullscreenPlayerDidPresent](#onfullscreenplayerdidpresent) | Android, iOS |
@ -338,7 +340,6 @@ var styles = StyleSheet.create({
| [onSeek](#onseek) | Android, iOS, Windows UWP | | [onSeek](#onseek) | Android, iOS, Windows UWP |
| [onTimedMetadata](#ontimedmetadata) | Android, iOS | | [onTimedMetadata](#ontimedmetadata) | Android, iOS |
### Methods ### Methods
| Name |Plateforms Support | | Name |Plateforms Support |
|--|--| |--|--|
@ -1026,6 +1027,17 @@ Payload: none
Platforms: all Platforms: all
#### onError
Callback function that is called when the player experiences a playback error.
Payload:
Property | Type | Description
--- | --- | ---
error | object | Object containing properties with information about the error
Platforms: all
#### onExternalPlaybackChange #### onExternalPlaybackChange
Callback function that is called when external playback mode for current playing video has changed. Mostly useful when connecting/disconnecting to Apple TV it's called on connection/disconnection. Callback function that is called when external playback mode for current playing video has changed. Mostly useful when connecting/disconnecting to Apple TV it's called on connection/disconnection.
@ -1689,3 +1701,4 @@ allprojects {
} }
``` ```
If you encounter an error `Could not find com.android.support:support-annotations:27.0.0.` reinstall your Android Support Repository. If you encounter an error `Could not find com.android.support:support-annotations:27.0.0.` reinstall your Android Support Repository.

View File

@ -685,7 +685,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
if _controls { if _controls {
let viewController:UIViewController! = self.reactViewController() let viewController:UIViewController! = self.reactViewController()
viewController.addChild(_playerViewController) viewController?.addChild(_playerViewController)
self.addSubview(_playerViewController.view) self.addSubview(_playerViewController.view)
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "react-native-video", "name": "react-native-video",
"version": "6.0.0-alpha.3", "version": "6.0.0-alpha.4",
"description": "A <Video /> element for react-native", "description": "A <Video /> element for react-native",
"main": "Video.js", "main": "Video.js",
"license": "MIT", "license": "MIT",
@ -34,6 +34,7 @@
"DRMType.js", "DRMType.js",
"TextTrackType.js", "TextTrackType.js",
"VideoResizeMode.js", "VideoResizeMode.js",
"react-native-video.podspec" "react-native-video.podspec",
"docs"
] ]
} }