Commit Graph

185 Commits

Author SHA1 Message Date
Igor Tironi
7284342cc6
Merge branch 'master' into always-check-for-hideShutterView 2022-04-29 22:12:34 -03:00
Eran Hammer
c5c4294127
Merge pull request #2575 from pdsouza/pd/fix-exoplayer-codec-error-NPE
[Android] Fix app crash from NPE in Exoplayer error handler
2022-04-19 15:35:07 -07:00
Eran Hammer
fb1abaf6a1
Merge branch 'master' into patch-1 2022-04-19 15:31:25 -07:00
Eran Hammer
c5d9a45023
Merge pull request #2073 from r0b0t3d/feature/android-fullscreen
[Android] fullscreen video
2022-04-19 09:58:42 -07:00
Igor Tironi
6d74eb686f Always check for hideShutterView before showing shutterView 2022-03-03 15:57:21 -08:00
Preetam D'Souza
24434f44c2 Fix NPE with null codecInfo 2022-01-14 23:48:11 -05:00
Tuan Luong
7373761a4c check null before trigger action 2021-12-12 13:47:50 +07:00
Tuan Luong
859a0b8447 Merge https://github.com/react-native-video/react-native-video into feature/android-fullscreen 2021-12-12 13:17:12 +07:00
Iagor Moraes
e7c009d908 add repository dependency and patch version 2021-12-09 15:23:48 -03:00
Tuan Luong
7c17f5ec96
Update ReactExoplayerView.java 2021-08-06 10:56:07 +07:00
Tuan Luong
4951c2e13c Merge https://github.com/react-native-video/react-native-video into feature/android-fullscreen 2021-07-04 15:18:38 +07:00
Nick
b5b5da0684 update exoplayer to allow pre-init and content clear 2021-06-30 11:34:02 +09:00
Armands Malejev
141192a56d
Upgrade ExoPlayer to 2.13.2 (#2317)
Upgrade ExoPlayer from 2.11.4 to 2.13.2 and fix any issues related to the upgrade and deprecated method use.
2021-06-24 14:01:11 +09:00
Armands Malejev
fcc66df945
Fix AudoFocus pausing video when attempting to play (#2311)
Fix AudioFocus bug that could cause the player to stop responding to play/pause in some instances.

Fixes issue #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.
2021-06-24 14:00:38 +09:00
Tuan Luong
d094886087 keep screen on when in fullscreen mode 2021-06-13 12:06:37 +07:00
Tuan Luong
c89649b513 Merge https://github.com/react-native-video/react-native-video into feature/android-fullscreen 2021-06-13 11:06:05 +07:00
Sean Holbert
3dc607c461
Exoplayer: Use okhttp version specified in gradle.properties (#2340)
Because React Native uses okhttp, including exoplayer causes apps to use two different versions of okhttp.  This results in some unpredictable behavior.  Clients of `react-native-video` should be able to specify the same OKHTTP version to react-native and react-native video.

See where it's specified in react-native trunk: 
- https://github.com/facebook/react-native/blob/master/ReactAndroid/gradle.properties#L15
- e1b6cd3f75/ReactAndroid/build.gradle (L452-L453)
2021-04-08 13:36:11 -04:00
Alec Winograd
5f1ec04cef
Fix default behavior for captions in ExoPlayer 2020-10-15 11:17:49 -05:00
Nick Fujita
553fef02cc Port over fix from 4.x branch 2020-08-17 16:28:36 +09:00
Daniel Mariño
81b42e7ca7
Add iOS and Android basic DRM support (#1445)
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)
2020-08-12 18:56:21 -07:00
Tuan Luong
4d35511fb9 add delay when hideSystemUI 2020-07-13 14:50:09 +07:00
Tuan Luong
0aa9a5901e do not hide fullscreen in stopPlayback 2020-07-13 14:41:38 +07:00
Tuan Luong
5fe76574bb add fullscreenOrientation 2020-07-10 10:45:41 +07:00
Tuan Luong
0b7ea71d77 update fullscreen activity 2020-07-05 11:00:25 +07:00
Tuan Luong
32880544e5 update manifest and import 2020-07-04 22:08:57 +07:00
Tuan Luong
94bceb472b add fullscreen activity 2020-07-04 17:41:15 +07:00
Jeferson Daniel
dbf1a4e034
Fix exoplayer aspect ratio update on source changes (#2053)
* Fix exoplayer aspect ratio update on source changes

* Update CHANGELOG.md
2020-06-30 19:00:16 +02:00
Anders Lemke
8962720f56
Support preventsDisplaySleepDuringVideoPlayback (#2019)
* 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>
2020-06-16 14:31:23 +02:00
Jens Andersson
f395bd1d3d
Removed JS fullscreening for Android (#2013) 2020-06-11 16:44:13 +02:00
limaAniceto
7c8c613a65
Upgrade exoplayer to 2.11.4 (#2034) 2020-06-11 09:17:33 -04:00
Param Aggarwal
0b914ef2b9
Expose currentPlaybackTime when live stream video (#1944)
* added trackId to exoplayer onLoad callback

* added trackInfo to bandwidth callback

* syntax fix

* syntax fix

* version update

* sending complete logcat for media playback exception ExoPlaybackException

* version bump

* package publish changes

* Live playback fix

* Version bump

* import fix

* version bump

* configurable preferredForwardBufferDuration

* configurable preferredForwardBufferDuration

* version update

* Exposing time

* exo player window current tsp

* return type

* Current window timestamp in epoch

* iOS changes

* version update

* Updated package.json

* updated version

* CurrentTime bug fix

* Updated package.json

* Updated currentPlaybackTime

* Updated currentPlayback logic

* Updated package.json

* Bug fix

* Added semicolon

* updated package.json

* Updated ReactVideoView

* updated verison

* Revert package.json changes

* Update ReactVideoView.java

* Use standard log

* Document preferredForwardBufferDuration (iOS)

* Document currentPlaybackTime

* Document trackId

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update README.md

* Update CHANGELOG.md

Co-authored-by: anubansal <anu.bansal@curefit.com>
Co-authored-by: Sivakumar J <sivakumar@curefit.com>
Co-authored-by: parikshit <parikshit@curefit.com>
Co-authored-by: anubansal92 <40559524+anubansal92@users.noreply.github.com>
Co-authored-by: Rishu Agrawal <rishu.agrawal@v.curefit.com>
Co-authored-by: rishu-curefit <54575330+rishu-curefit@users.noreply.github.com>
2020-05-15 09:25:19 +02:00
IbrahimSulai
fd8ac76e4d
Fix play/pause regression after added fullscreen support. (#1916) 2020-02-20 09:23:23 -05:00
Michael Tintiuc
82c191d97f
Improve Android Audio Focus (#1897)
Implement audio focus as per android docs:
https://developer.android.com/guide/topics/media-apps/audio-focus
https://medium.com/androiddevelopers/audio-focus-3-cdc09da9c122

AUDIOFOCUS_LOSS should abandon focus and not try resuming audio, this is done with AUDIOFOCUS_LOSS_TRANSIENT

This fixes at least:
- Audio not being paused after focus being taken by some voip applications
- Content resuming and pausing instantly sporadically (some race condition perhaps) when activity was resumed from background.
2020-02-17 11:53:56 -05:00
IbrahimSulai
9200dce1ae
Add full screen support to Android Exoplayer (#1730) 2020-01-28 17:21:21 -05:00
Learnyst
0df667692b Audio Poster issue fix (#1779) 2019-11-26 14:40:03 -05:00
Benoit Dion
b97663e092
Clear progress messages on STATE_IDLE and STATE_BUFFERING (#1768)
The progress message handler will duplicate recursions of the `onProgressMessage` handler on change of player state from any state to STATE_READY with `playWhenReady` is true (when video is not paused). This clears the messages on STATE_IDLE and STATE_BUFFERING to break the recursion.
2019-09-30 13:27:08 -04:00
Benoit Dion
3e38f88869 Remove Exoplayer deprecations
- Bump Exoplayer to 2.10.4
- Remove deprecated usages of Exoplayer methdos
- Add `ReactExoplayerConfig` as extension points to configure the Exoplayer instance
2019-09-23 08:52:05 -04:00
Daniel Mariño Ruiz
b954a4f01a
Merge pull request #1699 from andrewchae/mute
Fixed Exoplayer doesn't work with mute=true #1696
2019-09-21 09:52:00 +02:00
Andrew Chae
3012b81701 Fixed Exoplayer doesn't work with mute=true #1696 2019-08-01 15:08:47 -07:00
Daniel Mariño
88d3a4a0ba cpck androidx 2019-07-28 15:42:32 +02:00
Daniel Mariño Ruiz
a45e857bbc
Merge branch 'release/5.0.0' into update-androidx 2019-07-25 10:05:53 +02:00
vok
222adf5f7b remove matchingfallbacks in example 2019-07-24 09:02:50 +07:00
Daniel Mariño
f58ae349e8 remove extra whitespace 2019-07-09 11:41:03 +02:00
Daniel Mariño
f60aff7989 comment why postDelayed 2019-07-09 11:40:23 +02:00
Daniel Mariño
cde2432804 Merge branch 'rnv-master' into feature/handle-props-racing-conditions-on-expplayer
# Conflicts:
#	CHANGELOG.md
2019-07-09 11:39:30 +02:00
Daniel Mariño
cb3cff7772 fix repeat 2019-07-08 12:47:05 +02:00
Daniel Mariño
40c7371b3e fix for setControls 2019-07-07 22:17:15 +02:00
Daniel Mariño
466c004837 handle racing conditions when props are setted on exoplayer 2019-07-07 10:21:23 +02:00
Daniel Mariño Ruiz
9dec6aec4d
Merge branch 'release/4.4.3' into bugfix/android-disablefocus-audio 2019-07-06 09:16:19 +02:00
Daniel Mariño Ruiz
7949c55c94
Merge pull request #1629 from vokhuyetOz/android-28
Android 28, pre to androidx
2019-07-04 10:01:27 +02:00