Merge branch 'master' into fix/ensure_player_stop_on_invalid_url

This commit is contained in:
Olivier Bouillet 2022-09-28 22:03:19 +02:00 committed by GitHub
commit 13a3817d2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 63 additions and 13 deletions

12
API.md
View File

@ -421,12 +421,12 @@ Determines whether to show player controls.
* **true** - Show player controls * **true** - Show player controls
Note on iOS, controls are always shown when in fullscreen mode. Note on iOS, controls are always shown when in fullscreen mode.
Note on Android, native controls are available by default.
If needed, you can also add your controls or use a package like [react-native-video-controls](https://github.com/itsnubix/react-native-video-controls) or [react-native-media-console](https://github.com/criszz77/react-native-media-console), see [Usefull Side Project](./docs/PROJECTS.md).
### contentStartTime ### contentStartTime
The start time in ms for SSAI content. This determines at what time to load the video info like resolutions. Use this only when you have SSAI stream where ads resolution is not the same as content resolution. The start time in ms for SSAI content. This determines at what time to load the video info like resolutions. Use this only when you have SSAI stream where ads resolution is not the same as content resolution.
Note on Android, native controls are available by default. If needed, you can also add your controls or use a package like [react-native-video-controls].
Platforms: Android, iOS Platforms: Android, iOS
#### disableFocus #### disableFocus
@ -1610,11 +1610,3 @@ 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.
## Black Screen on Release build (Android)
If your video work on Debug mode, but on Release you see only black screen, please, check the link to your video. If you use 'http' protocol there, you will need to add next string to your AndroidManifest.xml file.
```
<application
...
android:usesCleartextTraffic="true"
>
```

View File

@ -2,6 +2,7 @@
### Version 6.0.0-alpha.4 ### Version 6.0.0-alpha.4
- ensure src is always provided to native player even if it is invalid [#2857](https://github.com/react-native-video/react-native-video/pull/2857) - ensure src is always provided to native player even if it is invalid [#2857](https://github.com/react-native-video/react-native-video/pull/2857)
- Android: Switch Google's maven repository to default `google()` [#2860](https://github.com/react-native-video/react-native-video/pull/2860)
### Version 6.0.0-alpha.3 ### Version 6.0.0-alpha.3
- fix ios build [#2854](https://gthub.com/react-native-video/react-native-video/pull/2854) - fix ios build [#2854](https://gthub.com/react-native-video/react-native-video/pull/2854)

View File

@ -13,5 +13,7 @@ Version 6.0.0 is introducing dozens of breaking changes, mostly through updated
- [Documentation](API.md) - [Documentation](API.md)
- [Changelog](CHANGELOG.md) - [Changelog](CHANGELOG.md)
- [Contribution guide](CONTRIBUTING.md) - [Contribution guide](CONTRIBUTING.md)
- [Usefull Side Project](./docs/PROJECTS.md)
- [Advanced debugging](./docs/DEBUGGING.md)
**react-native-video** was originally created by [Brent Vatne](https://github.com/brentvatne) **react-native-video** was originally created by [Brent Vatne](https://github.com/brentvatne)

View File

@ -27,8 +27,7 @@ android {
} }
repositories { repositories {
// Remove this repository line after google releases to google() or mavenCentral() google()
maven { url "https://dl.google.com/android/maven2" }
} }
dependencies { dependencies {

47
docs/DEBUGGING.md Normal file
View File

@ -0,0 +1,47 @@
# Advanced debuging and common issues
### HTTP playback doesn't work or Black Screen on Release build (Android)
If your video work on Debug mode, but on Release you see only black screen, please, check the link to your video. If you use 'http' protocol there, you will need to add next string to your AndroidManifest.xml file. [Details here](https://developer.android.com/guide/topics/manifest/application-element#usesCleartextTraffic)
```
<application
...
android:usesCleartextTraffic="true"
>
```
### Decoder Issue (Android)
Devices have a maximum of simulataneous possible playback. It means you have reach this limit. Exoplayer returns: 'Unable to instantiate decoder'
**known issue**: This issue happen really often in debug mode.
## You cannot play clean content (all OS)
Here are the steps to consider before opening a ticket in issue tracker
### Check you can access to remote file
Ensure you can download to manifest / content file with a browser for exemple
### Check another player can read the content
Usually clear playback can be read with all Video player. Then you should ensure content can be played without any issue with another player ([VideoLan/VLC](https://www.videolan.org/vlc/) is a good reference implementation)
## You cannot play protected content (all OS)
### Protected content gives error (token error / access forbidden)
If content is protected with an access token or any other http header, ensure you can access to you data with a wget call or a rest client app. You need to provide all needed access token / authentication parameters.
### Everything seems correct but content cannot be accessed
You need to record network trace to ensure communications with server is correct.
[Charles proxy](https://www.charlesproxy.com/) is a simple and usefull tool to sniff all http/https calls.
With this tool you should be able to analyze what is going on with network. You will see all access to content and DRM, audio / vido chuncks, ...
Then try to compare exchanges with previous tests you made.
### It's still not working
You can try to open a ticket now !

9
docs/PROJECTS.md Normal file
View File

@ -0,0 +1,9 @@
This page links other open source projects which can be usefull for your player implementation
# UI over react-native-video
- [react-native-video-controls](https://github.com/itsnubix/react-native-video-controls): First reference player UI
- [react-native-media-console](https://github.com/criszz77/react-native-media-console): React-native-video-controls updated and rewritten in typescript
- [react-native-corner-video](https://github.com/Lg0gs/react-native-corner-video): A floating video player
# Other tools
- [react-native-music-control](https://github.com/tanguyantoine/react-native-music-control): A toolbox to control player over media session