When moving init logic to a different thread we missed one function that was not captured if an error occurred. This PR wraps the source init function that happens on a different thread in a try/catch to capture any errors that occur.
This PR handles autoplay after disconnection
Jira: VEX-6625
There was an error in react-native-video not being properly handled, in addition, the state of the player when reconnecting using a free user was not the expected one, requesting the player to keep playing when ready, made the behavior consistent in all scenarios
Velocity PR: crunchyroll/velocity#2430
Reviews
Major reviewer (domain expert): @jctorresM
Minor reviewer: @jacob-livingston
This PR will fix the crash from the experiment on react-native-video
Jira: VEX-7093
velocity PR: crunchyroll/velocity#2443
The crash was caused by using the player object before it was set by another thread, the change simply waits for the player to be available before executing any player interaction after DRM initialization.
Reviews
Major reviewer (domain expert): @jctorresM
Minor reviewer: @jacob-livingston
On low end devices when replaying same content too quickly DRM could fail with an uncaptured error (DrmSessionException). To prevent this we now check for that error and retry DRM one more time.
Updates disableDisconnectError retry condition to be more specific.
Jira: VEX-6518
Reviews
Major reviewer (domain expert): @armadilio3
Minor reviewer: @gabriel-rivero
This PR changes the behavior on old devices that have poor memory management.
Jira: VEX-6030
https://jira.tenkasu.net/browse/VEX-6030
The solution implied customizing the method shouldContinueLoading from RNVLoadControl to use only the available heap, performing tests on an old Nexus 5 it was determined the ideal bytes allocation to half the reported heap, that provided some buffering during ads but smooth playback during the video with no crashes (23:39 of 23:39 at the moment of writing this, video kept playing as expected after 3 ad breaks)
The fix is only targeting Marshmallow as the reduction of buffer is substantial and other versions that work properly should not get affected.
Depending on the test result of VEX-5758, this same fix can be applied to Nougat
Reviews
Major reviewer (domain expert): @armadilio3
Minor reviewer: @nickfujita
- Allow player to be init before source is provided, and later update once a source is provided.
- Adds handling for providing a empty source in order to stop playback and clear out any existing content
This PR adds the property disableBuffering: boolean for android. The PR was initally created as a personal fork and referenced in crunchyroll/vilos#1227
also updated RNVLoadControl constructor and method to reflect new ExoPlayer.LoadControl api
related ticket: https://jira.tenkasu.net/browse/VEX-3776
Fix AudioFocus bug that could cause the player to stop responding to play/pause in some instances.
Fixes issue react-native-video#1945
This was caused by the player requesting audio focus on each play (un-pause) and that resulted in a small window of Audio focus loss and then gain. The focus loss results in the player being paused while the player was supposed to play at the time. The solution is to keep track of Audio focus and not request new focus if we already have it.
This PR adds support for DRM streams on iOS (Fairplay) and Android (Playready, Widevine, Clearkey)
I am neither Android nor iOS developer, so feel free to provide feedback to improve this PR.
**Test stream for ANDROID:**
```
testStream = {
uri: 'http://profficialsite.origin.mediaservices.windows.net/c51358ea-9a5e-4322-8951-897d640fdfd7/tearsofsteel_4k.ism/manifest(format=mpd-time-csf)',
type: 'mpd',
drm: {
type: DRMType.PLAYREADY,
licenseServer: 'http://test.playready.microsoft.com/service/rightsmanager.asmx?cfg=(persist:false,sl:150)'
}
};
```
or
```
{
uri: 'https://media.axprod.net/TestVectors/v7-MultiDRM-SingleKey/Manifest_1080p.mpd',
drm: {
type: 'widevine', //or DRMType.WIDEVINE
licenseServer: 'https://drm-widevine-licensing.axtest.net/AcquireLicense',
headers: {
'X-AxDRM-Message': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2ZXJzaW9uIjoxLCJjb21fa2V5X2lkIjoiYjMzNjRlYjUtNTFmNi00YWUzLThjOTgtMzNjZWQ1ZTMxYzc4IiwibWVzc2FnZSI6eyJ0eXBlIjoiZW50aXRsZW1lbnRfbWVzc2FnZSIsImZpcnN0X3BsYXlfZXhwaXJhdGlvbiI6NjAsInBsYXlyZWFkeSI6eyJyZWFsX3RpbWVfZXhwaXJhdGlvbiI6dHJ1ZX0sImtleXMiOlt7ImlkIjoiOWViNDA1MGQtZTQ0Yi00ODAyLTkzMmUtMjdkNzUwODNlMjY2IiwiZW5jcnlwdGVkX2tleSI6ImxLM09qSExZVzI0Y3Iya3RSNzRmbnc9PSJ9XX19.FAbIiPxX8BHi9RwfzD7Yn-wugU19ghrkBFKsaCPrZmU'
},
}
}
```
**Test stream for iOS:**
Sorry but I can not provide free streams to test. If anyone can provide test streams, or found some we can use, please let me know to also test them.
It has been tested with a private provider and they work, at least with the `getLicense` override method. (An example implementation is provided in the README)
* Add flag on iOS
* Add flag in Android
* Add documentation
* Add changelog entry
* Also set setKeepScreenOn
* Fix prop not being set
* add preventsDisplaySleepDuringVideoPlayback to exoplayer
* Update android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java
* Update android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java
Co-authored-by: Jens Andersson <jens@fritan.com>
Co-authored-by: Anton Tanderup <antontandrup@gmail.com>
Co-authored-by: Jens Andersson <jens@fritan.com>