Commit Graph

317 Commits

Author SHA1 Message Date
YangJH
f2e80e9f2d
feat(android): replace deprecated ExoPlayer2 with AndroidX media3 (#3337)
* feat(android): implement AndroidX media3 dependencies
* refactor(android): remove duplicate code
* refactor(android): remove unused codes
* feat(android): replace ExoPlayer2 with AndroidX media3
* fix(android): move default properties to gradle.properties
* revert(android): prevent security exception
* chore: align indent
* chore: remove redundant comments
* chore: reorder import
* fix: apply media3's legacy player control view
2023-11-18 14:13:54 +01:00
YangJH
8fbdc28a73
fix: fixes where Android's muted prop behavior differs from iOS (#3339) 2023-11-08 19:39:04 +01:00
Krzysztof Moch
6df0f7d1c0
chore(android): bump kotlin version (#3334)
* chore(android): update gradle files

* docs: update android installation section
2023-11-08 07:41:17 +01:00
Krzysztof Moch
cdbc856387
feat: add onVolumeChange event (#3322)
* feat: implement `onVolumeChange` event
2023-11-04 18:11:54 +01:00
Andy Garron
68beb2701a
[Android] use explicit not-exported flag for AudioBecomingNoisyReceiver (#3327)
* using explicit not-exported flag for AudioBecomingNoisyReceiver
* androidx.core:core version 1.9.0, androix.activity:activity version 1.6.0

---------

Co-authored-by: Andy G <Andy Garron>
2023-11-04 14:59:59 +01:00
Olivier Bouillet
0bfbda66e4
fix(android): ensure audio volume is changed in UI thread (#3292)
Co-authored-by: olivier <olivier.bouillet@ifeelsmart.com>
2023-10-18 22:45:19 +02:00
Jay Kim
c78077ff0a
fix(android): remove kotlin-android-extensions (#3299) 2023-10-18 22:31:31 +02:00
Olivier Bouillet
ab0398d7dc
Chore/refactor in api folder (#3285)
* feat: add prop to allow controlling of debug log level

* fix: move props parsing to safeGetters

* chore: fix typing

* chore: fix types and lintter

* chore: move file VideoEventEmitter

* fix: make VideoEventEmitter player agnostic

And create a dedicated API data for that

* chore: move generic file in API folder

---------

Co-authored-by: olivier <olivier.bouillet@ifeelsmart.com>
2023-10-13 17:27:55 +02:00
Olivier Bouillet
ad581ea2dc
chore(android): Fix/make videoEventEmitter agnostic on player (#3281) 2023-10-12 21:46:40 +02:00
Olivier Bouillet
a4073d3e70
chore(android): fix some android studio warning (#3290)
Co-authored-by: olivier <olivier.bouillet@ifeelsmart.com>
2023-10-12 10:36:43 +02:00
Krzysztof Moch
7fd7b3ff32
feat: refactor resize prop handler (#3286) 2023-10-11 21:56:54 +02:00
Olivier Bouillet
add87922a6
feat(android): add prop to control debug log level (#3277)
* feat: add prop to allow controlling of debug log level

* fix: move props parsing to safeGetters

---------

Co-authored-by: olivier <olivier.bouillet@ifeelsmart.com>
2023-10-10 09:47:56 +02:00
Krzysztof Moch
6e98cb9700
Merge branch 'master' into feat/playback-ref-functions 2023-09-29 22:44:32 +02:00
Olivier Bouillet
21de75eac6
Merge pull request #3254 from TheWidlarzGroup/feat/is-codec-supported-update
feat(android): update `isCodecSupported` to return enum
2023-09-29 18:28:18 +02:00
KrzysztofMoch
01c8e54e12 chore(android/gradle): add suport for AGP 8 2023-09-25 12:24:08 +02:00
KrzysztofMoch
842a156b3c chore(android/gradle): remove doubled compileOptions 2023-09-25 12:21:21 +02:00
KrzysztofMoch
4ad210b6c7 chore(android/gradle): update namespace handler 2023-09-25 12:21:21 +02:00
KrzysztofMoch
812e9dc84f feat(android): update isCodecSupported to return enum 2023-09-25 08:17:03 +02:00
KrzysztofMoch
f9743fdbd6 chore: invert setPlayerPauseState logic 2023-09-22 09:04:20 +02:00
KrzysztofMoch
421712825b chore: rename setPlayerStatus to setPlayerPauseState 2023-09-21 07:25:21 +02:00
KrzysztofMoch
0066ec744c feat(android): add playback functions to ref 2023-09-18 13:09:53 +02:00
olivier
19c8134dbc chore: fix build by adding a fallback on kotlin version 2023-09-05 22:17:37 +02:00
Craig Martin
0678a2ccf1 Fix: AudioOutput on Android 2023-09-05 14:27:10 -04:00
Craig Martin
89464279d1 Add missing import 2023-08-25 15:16:18 -04:00
Craig Martin
12edcf8555 Add missing import 2023-08-25 15:14:22 -04:00
Craig Martin
1111cdc15a Move enum to its own file 2023-08-25 15:09:19 -04:00
Craig Martin
dbeea19ce8 Formatting cleanup 2023-08-22 23:42:13 -04:00
Craig Martin
140cfe0a9c Additional formatting cleanup 2023-08-22 23:35:51 -04:00
Craig Martin
90a8eb245d Revert formatting changes to keep diff cleaner 2023-08-22 23:30:01 -04:00
Craig Martin
db6e73e035 Merge remote-tracking branch 'upstream/master' 2023-08-22 22:31:30 -04:00
Olivier Bouillet
30d8146916
Merge pull request #3175 from react-native-yeouido/feature/fabric-example
[New Arch] Fabric Example
2023-08-03 21:37:59 +02:00
Olivier Bouillet
90fe971dee
Merge pull request #3179 from vemarav/shuttercolor
Android: fixes black splashes
2023-08-03 20:59:35 +02:00
Olivier Bouillet
236d17e8b5
Merge branch 'master' into fix-memleak 2023-08-03 20:53:12 +02:00
Craig Martin
dc3e83a3d5 Merge remote-tracking branch 'upstream/master' 2023-07-27 16:24:11 -04:00
Aravind Vemula
28ac4d20f8 fixes black splashes on android 2023-07-23 21:38:26 +05:30
yungblud
0ca348f4b5 feat: setup kotlin 2023-07-19 16:32:19 +09:00
Olivier Bouillet
48fa1bc0e9
Merge pull request #3163 from mrousavy/patch-1
feat: RN 0.73 support
2023-07-08 12:51:38 +02:00
Marc Rousavy
7e5bc488c7
feat: RN 0.73 support
Adds `namespace` prop which is required by Gradle 8 (dep. of RN 0.73)
2023-07-03 22:12:44 +02:00
Roland Yeghiazaryan
7f3d707628
Fix ids in exo_player_control_view 2023-06-15 10:56:37 +02:00
Basix
493b620e63
Move OnAudioFocusChangeListener to own class 2023-05-09 11:45:56 +09:00
Craig Martin
e0095c3aff Make sure audioOutput is respected on first render 2023-04-12 17:43:52 -04:00
Craig Martin
daabb91475 Allow audio output via earpiece 2023-04-02 14:02:56 -04:00
Yavor Ivanov
b65f94b27e Merge branch 'master' into AndroidRangePlayback 2023-02-13 18:15:06 +02:00
Yavor Ivanov
31b43f232b android support for partial video range 2023-02-13 17:57:13 +02:00
Yavor Ivanov
e3fb49cebb Android formatting fixes 2023-02-13 17:30:24 +02:00
Yavor Ivanov
3266eb2d67 Merge remote-tracking branch 'official/master' 2023-02-13 15:39:22 +02:00
olivier
7aeaa2a3d1 chore(android): fix path to disable CSAI 2023-02-09 23:20:10 +01:00
Yavor Ivanov
a56b4d148c Fixed android build error 2023-02-09 13:53:06 +02:00
Radin Gospodinov
6ca0ab3834 Android range playback. 2023-02-09 09:38:05 +02:00
olivier
57b4a76775 fix: add stub for IMA and option to enable it on demand 2023-02-07 23:14:50 +01:00
Samet Şahin
9d72011009 fix 2023-01-18 14:53:34 +03:00
Samet Şahin
07d0c9ebfc fix 2023-01-18 13:41:32 +03:00
Olivier Bouillet
9bcca0c5be
Merge pull request #2806 from iFeelSmart/feat/add_new_events_on_tracks_changed
Feature(android): new events on tracks changed
2023-01-03 18:50:38 +01:00
olivier bouillet
2b6654b458 Merge branch 'master' of https://github.com/react-native-video/react-native-video into feat/add_new_events_on_tracks_changed
# Conflicts:
#	API.md
#	android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java
#	android/src/main/java/com/brentvatne/exoplayer/VideoEventEmitter.java
#	examples/basic/yarn.lock
2023-01-02 22:59:10 +01:00
olivier bouillet
8c95464788 fix(android): fix tracks selection 2023-01-02 21:52:41 +01:00
olivier bouillet
7cd164ea2c chore(android): small refactor to avoid unnecessary allocations 2023-01-02 21:52:08 +01:00
olivier bouillet
c529f1ecad fix(android): clear progress handler before adding new one 2022-12-22 08:37:31 +01:00
Jay Kim
c263cc89ff
fix(android): check null activity
If activity is null at initialization, the app crashes. This change checks for null activity and throw react native error, which prevents app crash.
2022-12-14 13:26:29 +09:00
Axel Vencatareddy
eef8f2cecc
Merge branch 'master' into master 2022-11-30 13:14:07 +01:00
Axel Vencatareddy
567c299b2a [ANDROID ADS] Always setAdTagUrl even if it's null 2022-11-30 12:39:43 +01:00
Axel Vencatareddy
8040ac99ce [ADS] Make ImaAdsLoader nullable 2022-11-16 20:46:36 +01:00
Axel Vencatareddy
8ee6ad9900 [ADS] Add adOverlayFrameLayout in layout instead of view 2022-11-16 20:16:37 +01:00
Axel Vencatareddy
0a30f207df [ANDROID] Remove multidex usage as it is not mandatory 2022-11-16 20:11:29 +01:00
Axel Vencatareddy
b9f6ed438c [ANDROID] Update build.gradle 2022-11-16 19:20:06 +01:00
Axel Vencatareddy
0d70c53f53 [ANDROID] Fix reformating code that do not belong to this feature 2022-11-16 13:45:18 +01:00
Axel Vencatareddy
c789363c5b [ANDROID] Fix video not playing if no adTagUrl passed 2022-11-16 13:42:25 +01:00
Axel Vencatareddy
915e31a874 [CLEAN] Cleanup useless code 2022-11-16 13:23:50 +01:00
Axel Vencatareddy
9c930ce960 [ANDROID] Update ads to latest sdk 2022-11-16 11:43:35 +01:00
Axel Vencatareddy
002f39181a [ANDROID] Fix android after merge 2022-11-09 14:26:39 +01:00
Axel Vencatareddy
d5c245e675 Merge remote-tracking branch 'olgunkaya/master' 2022-11-09 13:14:04 +01:00
olivier bouillet
55209b48c0 fix: refactor full screen button visibility update 2022-11-03 23:06:42 +01:00
olivier bouillet
53fe1973e5 fix: review safety checks 2022-11-03 23:06:12 +01:00
olivier bouillet
a323bd0523 fix: refactor fullScreenPlayerView creation 2022-11-03 23:05:39 +01:00
olivier bouillet
973651e416 fix(android): hide fullscreen button when already in full screen 2022-11-03 08:26:06 +01:00
olivier bouillet
64e024d149 Merge branch 'master' of https://github.com/react-native-video/react-native-video into feat/add_new_events_on_tracks_changed
# Conflicts:
#	CHANGELOG.md
#	android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java
#	examples/basic/src/VideoPlayer.android.tsx
2022-10-29 15:20:36 +02:00
Olivier Bouillet
f25308bc06
Merge branch 'master' into chore/fix_lintter_warning 2022-10-16 15:40:21 +02:00
olivier bouillet
07c5ba674a chore(android): fix linter warning 2022-10-16 15:37:29 +02:00
olivier bouillet
f0a7a636c0 Merge branch 'master' of https://github.com/react-native-video/react-native-video into fix/ensure_player_stop_on_invalid_url
# Conflicts:
#	CHANGELOG.md
2022-10-02 21:25:26 +02:00
Liam Potter
1406b9ad08 Add focusable prop 2022-09-26 01:51:18 +01:00
Licaon_Kter
3b58fe9c07
Exoplayer is in google()
ref: https://github.com/google/ExoPlayer/releases/tag/r2.13.3

ref: https://mvnrepository.com/artifact/com.google.android.exoplayer/exoplayer?repo=google
2022-09-19 09:44:49 +00:00
olivier bouillet
0b6f107020 Merge branch 'master' of https://github.com/react-native-video/react-native-video into feat/add_new_events_on_tracks_changed 2022-09-14 22:43:59 +02:00
olivier bouillet
f4f9e28fb1 fix(exoplayer): allow uri to high case 2022-09-14 21:58:39 +02:00
olivier bouillet
f31e47f360 fix(exoplayer): ensure player is stopped when invalid uri is configured 2022-09-14 21:58:17 +02:00
wood1986
2a77c5f0df fix: fix the system status bar when dismiss 2022-09-13 22:53:49 -07:00
olivier bouillet
5aa4d6697d Merge branch 'master' of https://github.com/react-native-video/react-native-video into feat/add_new_events_on_tracks_changed
# Conflicts:
#	android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java
2022-09-12 21:58:51 +02:00
wood1986
5b2a4741dd fix: add relayout when fullscreenview dismiss 2022-09-10 15:08:15 -07:00
wood1986
f0c40f9392 fix: fix the default behaviour 2022-09-10 11:52:46 -07:00
ATNASGDWNGTH
3e4e4e6a12
Merge branch 'react-native-video:master' into feat/expo-fullscreen 2022-09-09 00:00:18 -07:00
Olivier Bouillet
663ae7c81b
Merge pull request #2846 from crunchyroll/task/VEX-7629-upgrade-exoplayer-to-2-18-1
Upgrade exoplayer to 2.18.1
2022-09-08 19:07:04 +02:00
wood1986
5203fa63d4 fix: handle the initial fullscreen props 2022-09-08 00:31:47 -07:00
wood1986
40e8d9474f fix: add the missing dependency 2022-09-07 14:45:55 -07:00
Gabriel Rivero
f558d05923 upgrade exoplayer 2022-08-26 10:32:22 -04:00
wood1986
a79c30eaba fix: fix control not showing up at very first touch 2022-08-23 17:31:14 -07:00
wood1986
622f9d3f3f fix: fix the hardware back button 2022-08-23 17:31:14 -07:00
wood1986
810c62407f WIP 2022-08-23 17:31:14 -07:00
wood1986
470ca7bf60 WIP 2022-08-23 17:31:14 -07:00
wood1986
b144a50f41 feat: add full screen support based on expo-av implementation 2022-08-23 17:31:14 -07:00
olivier bouillet
2712069408 chore(android): change test logic for simplier code 2022-08-20 15:12:50 +02:00
olivier bouillet
9e92f1ef3f Merge branch 'master' of https://github.com/react-native-video/react-native-video into feature/add_api_to_retrieve_decoder_capabilities 2022-08-20 14:32:57 +02:00
olivier bouillet
268b34d5de Merge branch 'master' of https://github.com/react-native-video/react-native-video into feat/subtitles_style 2022-08-20 14:29:25 +02:00
Olivier Bouillet
11cde867df
Merge pull request #2741 from iFeelSmart/fix/avoid_duplicated_onEnd
fix(android): ensure we don't disable playback when player is ENDED
2022-08-20 14:27:38 +02:00
olivier bouillet
63008ced42 feat(android): add new events for audioTrack, textTracks and videoTracks 2022-08-06 12:05:07 +02:00
olivier bouillet
62ce3df461 chore: remove strange character 2022-08-06 12:03:10 +02:00
olivier bouillet
3675dc2789 fix(android): add support of square video format 2022-08-05 19:04:35 +02:00
olivier bouillet
a03c7342fb fix(android): contentStartTime default value 2022-08-05 18:57:10 +02:00
freeboub
8302e58844
Merge pull request #2768 from wood1986/fix/playbutton
fix: fix the play button not shown after pausing video at the very first time
2022-08-01 14:49:28 +02:00
wood1986
f7aeb72950 fix: fix the play button no shown after pausing video at the very first time 2022-07-14 11:58:50 -07:00
olivier bouillet
b64c7dbea5 feat: add support of subtitles style configuration 2022-07-05 23:58:30 +02:00
evkwan
12189a94eb - fix spacing issue 2022-07-04 01:03:38 +08:00
evkwan
95a55a2551 - fix spacing 2022-07-04 01:03:38 +08:00
evkwan
4a558f4b32 #2665 - fix maxbitrate property being ignored on Android due to selected track overwrite 2022-07-04 01:00:10 +08:00
olivier bouillet
b10de93128 fix(android): ensure we don't disable playback when player is ENDED (issue #2690) 2022-06-23 23:51:52 +02:00
olivier bouillet
3a4cb7f6d9 feat(android): add new apis to query device capabilities
getWidevineLevel => integer between 0 and 3
isCodecSupported(codec, width, height) => boolean
isHEVCSupported() => boolean
2022-06-23 22:54:03 +02:00
Eran Hammer
f800776508
Port of #1493. Closes #2478. 2022-06-23 13:31:34 -07:00
olivier bouillet
5aeb49e094 Merge branch 'master' of https://github.com/react-native-video/react-native-video into fix/report_time_position_when_updated
# Conflicts:
#	CHANGELOG.md
2022-06-23 21:58:11 +02:00
olivier bouillet
de2c4a5524 chore: move android-exoplayer to android folder 2022-06-15 22:30:24 +02:00
olivier bouillet
32718be951 chore: remove MediaPlayer source 2022-06-15 22:29:46 +02:00
Tai Le Tuan
daf5e595ec
feat: upgrade exoplayer to v2.17.1 (#2498)
Describe the changes
Upgrade ExoPlayer to version 2.17.1

Provide an example of how to test the change
Tested with a forked of react-native-video-test

* Update exoplayer to v2.15.1

* feat: upgrade ExoPlayer to version 2.17.1

* chore: update CHANGELOG

* remove ExoPlayerFullscreenVideoActivity

* Fix build issues

* Fix build & runtime issues

Co-authored-by: Eran Hammer <eran@hammer.io>
Co-authored-by: Armands Malejev <armands.malejevs@gmail.com>
2022-06-15 10:24:55 -07:00
MONSX662
5a94985762 updated parameter to use constant instead of 3 2022-06-08 11:52:33 -04:00
MONSX662
c110822b3f updated ReactVideoView.java to fix seeking issue on android 2022-06-07 08:57:31 -04:00
Eran Hammer
fd821d2c5c
Merge pull request #2672 from thang2162/patch-2
Update Android dependency to JitPack!
2022-06-05 10:41:09 -07:00
Eran Hammer
8cc131b6a6
Revert "[Android] fullscreen video" 2022-05-20 22:42:55 -07:00
Tone T. Thangsongcharoen
3bd4dcd998
Update Dependency to JitPack!
Updated Android-ScalableVideoView to use JitPack instead of JCenter as JCenter has been deprecated. https://www.jitpack.io/#thang2162/Android-ScalableVideoView
2022-05-04 20:21:17 -05: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
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
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
vok
a96fa33714 change minSdkVersion back to 16 2019-06-19 14:46:20 +07:00
vok
4f36eb1254 update for androidX 2019-06-19 14:37:21 +07:00
JB Paul
327d8625a1
simplified logic 2019-05-24 17:53:13 +09:00
JB Paul
3989d73063
react-native 0.59 support 2019-05-24 16:32:05 +09:00
Hampton Maxwell
52334f031a
Merge pull request #1328 from linguokun1/master
solve the memory leak on Android and avoid the crash on kitkat
2018-12-13 12:50:25 -08:00
Hampton Maxwell
b485e64c88
Add note about catching selectTimedMetadataTrack exception 2018-12-13 12:50:17 -08:00
Hampton Maxwell
46701448e7
Only select timed metadata tracks 2018-12-13 12:43:11 -08:00
Hampton Maxwell
413a7b87c6 Only fire onSeek once we've completed the seek operation 2018-11-27 19:48:41 -08:00
linguokun
0a12f7389e solve the memory leak on Android and avoid the crash on kikat when call mp.selectTrack(0); 2018-11-15 17:57:37 +08:00
Hampton Maxwell
051a2c39f4
Merge branch 'master' into fix/gradle3 2018-10-13 19:18:13 -07:00
Matthew Herz
33d9acdf5d
Fix missing TargetApi import
The build was producing a "cannot find symbol class TargetApi" error without that line.
2018-09-06 12:56:36 -07:00
Tom Spencer
00174b63b8 Support RN 0.57 w/ gradle 3 2018-09-06 09:44:27 +01:00
Hampton Maxwell
4fc0aab31c
Merge pull request #707 from RWOverdijk/feat/ontimedmetadata-android
Feat/ontimedmetadata android
2018-08-07 11:37:11 -07:00
Hampton Maxwell
3a1d81930e
Allow screen to sleep when video finishes 2018-08-05 17:34:16 -07:00
Hampton Maxwell
bd48a001c0
Switch to using setKeepScreenOn to prevent screen timeouts 2018-08-05 17:27:49 -07:00
Gerardo Pacheco
99591e45d6 Android: MediaPlayer - Prevent screen from dimming, make variable as final 2018-07-25 10:34:41 +02:00
Gerardo Pacheco
ab273ed1b5 Android: MediaPlayer - Prevent screen from dimming, check for activity 2018-07-25 10:24:48 +02:00
Gerardo Pacheco
7e5647d57f Android: MediaPlayer - Prevent screen from dimming, fixed bug and simplified code 2018-07-25 10:02:04 +02:00
Gerardo Pacheco
5435e5d545 Merge branch 'master' of https://github.com/react-native-community/react-native-video
# Conflicts:
#	android/src/main/java/com/brentvatne/react/ReactVideoView.java
2018-07-25 09:58:46 +02:00
Danish
6c946d77f3
little improvement over too many "def"
just added a function which acts like a ternary with fallback option. Hence, less cluttered "def" variables
great to see that lib is supporting already SDK 27
2018-07-24 17:36:24 +03:00
Hampton Maxwell
18efffbd1a Implement hacky fullscreen
This only handles the controls portion of fullscreen. It doesn't make the video use the entire screen, that still needs to be done via styles. Will be implemented later
2018-07-17 17:47:19 -07:00
Gerardo Pacheco
2f0b694b38 Android: MediaPlayer - Prevent screen from dimming 2018-07-11 12:28:26 +02:00
Gerardo Pacheco
240444c213 Android keep screen on 2018-07-10 15:00:56 +02:00