Commit Graph

52 Commits

Author SHA1 Message Date
Kamil Moskała
adbd06e2df
feat: add ability to define poster props as Image type and render poster as custom component (#3972) 2024-07-22 22:38:35 +02:00
Krzysztof Moch
111a5d2163
feat: add isSeeking to onPlaybackStateChanged (#3899)
* feat: add `isSeeking` to `onPlaybackStateChanged``

* refactor `onSeek` event emit logic

* fix rebase
2024-07-11 10:08:36 +02:00
Olivier Bouillet
66dcf32b56
refactor: move view type and drm in source (#3867)
* perf: ensure we do not provide callback to native if no callback provided from app

* chore: rework bufferConfig to make it more generic and reduce ReactExoplayerView code size

* chore: improve issue template

* fix(android): avoid video view flickering at playback startup

* chore(android): refactor DRM props into a dedicated class

* Update android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java

* chore: fix linter

* fix: ensure drm prop is correctly cleaned

* feat(android): move viewType (secure texture) & drm inside the source

The origianl behavior has been kept for interoperability, but marked as deprecated in doc

* chore: fix linter

* chore(ios): move drm prop in source like on android

* chore: fix linter

* chore: clean log

* fix: allow to disable secure View

* chore: fix viewType resolution (source value was not handled)

* chore: use contentDeepEquals instead of manual checks

* chore: fix linter

* fix: ensure player doesn't start when view is unmounted

* Fix/ensure view drop stop playback startup (#3875)

* fix: ensure player doesn't start when view is unmounted

* chore: revert change

* chore: add warning in case of invalid Surface configuration

* chore: code clean

* fix: simplify surface management

* chore: restore previous code

* chore: fix typo

* chore: code cleanup

* feat(android): add multiDrm flag support

* docs: update docs

* chore: fix ios build

* chore: fix deprecated declaration

---------

Co-authored-by: Krzysztof Moch <krzysmoch.programs@gmail.com>
2024-07-10 12:17:22 +02:00
Olivier Bouillet
b431d09e2f
chore(android): rework view type (#3940) 2024-06-27 11:58:06 +02:00
Ash Mish
c2ce372bcf
feat(android): add onControlsVisiblityChange (#3925)
* Adding onControlsVisiblityChange for Android
2024-06-22 11:15:21 +02:00
Seyed Mostafa Hasani
3a4a13011a
chore: add setFullScreen to component's ref (#3855)
* chore: add setFullScreen to component's ref and remove presentFullscreenPlayer & dismissFullscreenPlayer
2024-06-10 22:41:26 +02:00
Olivier Bouillet
d4a8c24f65
feat(android): allow chunckless preparation (#3882)
* feat(android): add a way to disable chuncklessPreparation on HLS
2024-06-07 14:06:46 +02:00
Olivier Bouillet
b698b1837b
fix(android): video resolution orientation android (#3862)
* fix(android): ensure width/heigh respect rotation of the video + Add rotation info in onVideoTrack event
2024-05-31 18:53:24 +02:00
Olivier Bouillet
8ad1047dc5
chore(docs): fix typo (#3859)
* perf: ensure we do not provide callback to native if no callback provided from app

* chore: rework bufferConfig to make it more generic and reduce ReactExoplayerView code size

* chore: improve issue template

* fix(android): avoid video view flickering at playback startup

* chore: fix typo in showNotificationControls
2024-05-30 12:57:30 +02:00
Olivier Bouillet
d072aeb451
Docs: fix controlsStyle ordering (#3848)
* docs: fix controlsStyle ordering
2024-05-28 11:58:50 +02:00
Seyed Mostafa Hasani
c7f4d7b83b
feat: add getCurrentPosition to component's ref (#3824)
* feat: add getCurrentPosition to component's ref
---------

Co-authored-by: mostafahasani <hasanie.mostafa@alopeyk.com>
2024-05-28 11:00:38 +02:00
Seyed Mostafa Hasani
5059e7a7f1
feat(android): handle increment forward and rewind buttons (#3818)
* feat(android): handle increment forward and rewind buttons
* fix: function name for get seekIncrementMS
2024-05-28 09:32:30 +02:00
Krzysztof Moch
46e12e0b94
docs: update min iOS version info (#3814)
* docs: update min iOS version info

* Update docs/pages/component/props.mdx

---------

Co-authored-by: Olivier Bouillet <62574056+freeboub@users.noreply.github.com>
2024-05-28 09:31:00 +02:00
YangJH
089dc7e032
feat(android): change default user agent value (#3813)
* feat(android): change default user agent value

* docs: fix headers prop platform
2024-05-22 22:59:32 +02:00
Olivier Bouillet
cad5c4624c
fix(android)!: rework video tracks management (#3778)
* fix: fix crash when invalid index type is provided and minor clean up
* fix: review video track management. Fix index support and rework string vs int in tracks management
* fix: ABR track selection check
* fix: split track selector in sample and lint code
* fix: ensure we don't report null fields
* chore: improve tracks displayed
* chore: start moving to selection by index only
2024-05-22 14:01:55 +02:00
Olivier Bouillet
e16730de11
fix(android): implement live configuration management (#3792)
* perf: ensure we do not provide callback to native if no callback provided from app

* chore: rework bufferConfig to make it more generic and reduce ReactExoplayerView code size

* chore: improve issue template

* fix(android): avoid video view flickering at playback startup

* feat(android): implement live buffer configuration

* chore: fix linter
2024-05-20 16:18:20 +02:00
Seyed Mostafa Hasani
8fdc52372c
docs: update document link (#3796)
* fix: relative path

---------

Co-authored-by: mostafahasani <hasanie.mostafa@alopeyk.com>
2024-05-20 15:58:11 +02:00
Seyed Mostafa Hasani
95e6140eea
feat(android): add possibility to hide seekBar (#3789)
* feat: hide seekBar on Android when a video is a live broadcast

* refactor: prop name & code

* chore: update the document for a new prop (controlsStyles)

* refactor: code

* remove: additional variables

* fix: indent issues

* remove: duplicate function

* Update android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerViewManager.java

revert change1

* Update android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerViewManager.java

revert change2

* Update android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerViewManager.java

* Update android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerViewManager.java

chore: revert indent change

* Update android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerViewManager.java

chore: revert indent change

* Update android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerViewManager.java

chore: revert indent change

* Update android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerViewManager.java

chore: revert indent change

* Update android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerViewManager.java

chore: revert indent change

* fix: eslint errors

* Update android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java

chore: revert indent change

---------

Co-authored-by: Olivier Bouillet <62574056+freeboub@users.noreply.github.com>
2024-05-20 12:45:18 +02:00
Seyed Mostafa Hasani
3cd7ab60b2
feat: add setVolume function to component's ref (#3794)
* feat: add setVolume function to component's ref

* Update methods.mdx
2024-05-20 12:21:48 +02:00
Olivier Bouillet
e420418e8f
feat(android): make buffering strategy dynamic (#3756)
* chore: rework bufferConfig to make it more generic and reduce ReactExoplayerView code size
* feat: expose bufferingStrategy to app and change default behavior
rename disableBuffering undocumented prop to bufferingStrategy and document it.
before this change, default was 'dependingOnMemory'. It can trigger some unnecessary gc() call on android.
2024-05-11 22:02:04 +02:00
Krzysztof Moch
cbdcbf2573
chore: update repository links (#3742) 2024-05-07 17:25:09 +02:00
Krzysztof Moch
8ad4be459b
feat: add notification controls (#3723)
* feat(ios): add `showNotificationControls` prop

* feat(android): add `showNotificationControls` prop

* add docs

* feat!: add `metadata` property to srouce

This is breaking change for iOS/tvOS as we are moving some properties, but I believe that this will more readable and more user friendly

* chore(ios): remove UI blocking function

* code review changes for android

* update example

* fix readme

* fix typos

* update docs

* fix typo

* chore: improve sample metadata notification

* update codegen types

* rename properties

* update tvOS example

* reset metadata on source change

* update docs

---------

Co-authored-by: Olivier Bouillet <freeboub@gmail.com>
2024-05-07 12:30:57 +02:00
Olivier Bouillet
e05da4e9fe
feat(android): implement asset folder playback (#3733)
* fix(ts): onPlaybackRateChangeData was not correctly typed

* fix: ensure tracks are well displayed in the sample

* feat(android): implement playback from asset folder

* chore(android): fix linter

* chore: move sample mp4 from package assets to exemple assets
2024-05-06 21:51:17 +02:00
Olivier Bouillet
4c63988d12
docs: review and clean up (#3730)
* fix(ts): onPlaybackRateChangeData was not correctly typed

* fix: ensure tracks are well displayed in the sample

* chore: reorder drm props

* chore: reorder events

* docs: move onAudioTracks to events

* docs: reorder and clean <PlatformsList from methods

* docs: fix props case naming

* docs: fix ordering

* docs: fix ordering & remove trackId

* chore: remove sample build from installation page

* docs: remove outdated information

* docs: remove beta information from doc landing page
2024-05-04 14:36:39 +02:00
lovegaoshi
ecc946d1c1
feat(android): cache (#3514)
* feat: android cache

* docs: bufferSize

* Revert "docs: bufferSize"

This reverts commit 09637b134e121b9ca3ffd78f2f5bc657319ed67a.

* fix: cacheSize name

* feat: singleton android cache

* fix: local cache resolve

* fix: lint

* docs: android cache

* chore: merge conflict

* fix: lint

* chore: useCache button

* chore: fix state in the sample

* fix: cache factory

* chore: update cacheSizeMB docs

---------

Co-authored-by: Olivier Bouillet <freeboub@gmail.com>
2024-05-01 11:20:34 +02:00
Olivier Bouillet
1a8295c8bf
fix(ios): ensure orientation is correct on iOS (#3719)
* fix(ts): onPlaybackRateChangeData was not correctly typed

* fix: ensure tracks are well displayed in the sample

* fix(iOS): ensure orientation is correctly reported

* chore: fix build
2024-04-26 10:02:13 +02:00
Olivier Bouillet
e8ce4979b3
docs: no onSeek callback with controls on iOS (#3701)
* fix(ts): onPlaybackRateChangeData was not correctly typed

* fix: ensure tracks are well displayed in the sample

* fix(android): add onSeek callback when controls are enable

* chore: remove seekTime which is useless now

* doc: indicate that onSeek is not reported when controls are enable on iOS
2024-04-23 09:01:50 +02:00
Olivier Bouillet
d6941392e0
fix: ensure poster works as expected and add it to the sample (#3643)
* fix: ensure poster works as expected and add it to the sample
* chore: drop audioOnly property as not implemented on any platform
* fix(ios): do not save pause state before seeking
* fix(ts): onPlaybackRateChangeData was not correctly typed
2024-04-05 10:35:57 +02:00
Olivier Bouillet
2633f087d2
doc: fix table format (#3649) 2024-04-03 22:19:13 +02:00
Olivier Bouillet
f10511d953
fix(android): improve and backBufferDurationMs. mainly let exoplayer manage the prop (#3619)
BREAKING CHANGE: move backBufferDurationMs from root props to bufferConfig
2024-03-28 21:33:17 +01:00
Olivier Bouillet
3d7444ab25
fix(android): ensure rate is never set to 0 (#3593)
* fix(android): ensure rate is never set to 0

---------

Co-authored-by: Olivier Bouillet <olivier@OrdinateOlivier.lan>
2024-03-21 15:40:25 +01:00
coofzilla
f4cce2ecdb
feat: implement opacity to control visibility of subtitles (#3583)
* feat: implement opacity to control visibility of subtitles

implemented per discussion on https://github.com/react-native-video/react-native-video/issues/3579

updated docs and linked onTextTrackDataChanged to the subtitle style to clarify intent on how to control visibility.

* chore: update type so that we use a union of 0 1 vs any number

* chore: run ktlint to get rid of white spaces

* feat: add ability to have range of numbers for opacity; while, 0 will still not render the subtitles.

added util function for safeGetFloat

updated types

* feat: add ability to suppress subtitles with opacity 0

add data structure for subtitle styles for extensibility

* chore: run yarn check-ios

* chore: update documentation to clarify differences between android and ios

* Update android/src/main/java/com/brentvatne/exoplayer/ExoPlayerView.java

Co-authored-by: Olivier Bouillet <62574056+freeboub@users.noreply.github.com>

---------

Co-authored-by: Olivier Bouillet <62574056+freeboub@users.noreply.github.com>
2024-03-14 11:29:50 +01:00
Krzysztof Moch
41ac781412
feat: move require (local files) to source.uri (#3535)
* feat!: move require source to `uri`

* pass other source properties

* chore: update basic example

* chore: restore backward compatibility

* docs: update source via require

* fix types

* make docs build workflow pretty

* improve docs
2024-03-13 08:23:11 +01:00
Olivier Bouillet
7c4d19fa72
fix(ios): split licenseUrl and loadedLicenseUrl (#3578)
* fix(ios): split licenseUrl and loadedLicenseUrl
* fix(ios): fix drm license url used to provide the answer
2024-03-12 16:47:49 +01:00
coofzilla
6184c10acc
feat(android): add subtitle event (#3566)
* feat: add onCues method to get access to subtitle content
2024-03-11 13:50:19 +01:00
Krzysztof Moch
4fc7d2788b
fix(docs): fix build (#3571) 2024-03-08 13:04:27 +01:00
Dominik Danielewicz
962ca2d195
docs: update platforms in properties tab (#3562)
* docs: update platforms in properties tab

* docs: update platforms in drm, events and methods tab
2024-03-08 12:48:01 +01:00
Tarun Chauhan
ba00881ddc
fix: add missing shutterColor type (#3561) 2024-03-05 18:57:58 +01:00
coofzilla
253ffb5956
feat(ios): Add ios support for accessing WebVTT Subtitle Content (#3541)
* feature: add support to get subtitle content data

* refactor: return a string of the subtitles

Push the parsing/formatting to the consumer side.

* chore: add types for new subtitle feature

* chore: run swiftlint and swiftformat

* chore: add documentation for new onSubtitleTracks callback

* chore: added test uri; basic implementation of feature; hotfix onTextTracks

added optional chaining for `return x?.selected` because tracks that don't have a track selected either by default or manually will return undefined and this can cause an error.

* feat: rename onSubtitleTracks to onTextTrackDataChanged

Renamed the onSubtitleTracks event to onTextTrackDataChanged across the codebase to clearly indicate the callback's purpose: being called when the text track's data changes. This change is reflected in the events documentation, example usage in VideoPlayer.tsx, and the relevant iOS implementation files for consistency and clarity, in line with PR feedback.

* chore: omit target property

target could be confusing for users so we have removed it. using the delete operator instead of using {target,...eventData} as that would give an eslint error about unused vars.
2024-02-29 14:41:04 +01:00
Krzysztof Moch
4b4636619d
docs: fix invalid resume function name (#3515) 2024-02-02 08:32:51 +01:00
Olivier Bouillet
6a49cba273
feat: implement onAudioTracks and onTextTracks on ios (#3503)
* feat: implement onAudioTracks and onTextTracks on ios

* chore: lint code

* fix: rework previous fix to fix linter and be more aligned with architecture

---------

Co-authored-by: olivier <olivier.bouillet@ifeelsmart.com>
2024-02-01 08:56:00 +01:00
Krzysztof Moch
2094dbdce6
docs: add ads section (#3502) 2024-01-28 20:03:07 +01:00
Krzysztof Moch
53359a248b
docs: add visionOS platform (#3477)
* docs: add visionOS platform

* update docs
2024-01-16 07:21:38 +01:00
Olivier Bouillet
50268265fb
doc: improve uri value to specify the value should be url encoded (#3441)
Co-authored-by: olivier <olivier.bouillet@ifeelsmart.com>
2023-12-24 14:38:33 +01:00
Axel Vencatareddy
596c02d2b3
feat: add onAdError event listener (#3381)
* feat: add onAdError event listener
* feat: remove onAdError event listener and use already existing
* feat: add ERROR event to docs
2023-12-02 13:52:01 +01:00
Axel Vencatareddy
d05231d76b
feat(ad): add data to onReceiveAdEvent (#3378)
* feat(ad): add adData to onReceiveAdEvent
* fix: remove adData from response if empty
* fix: add getAdData to stub file
* chore: fix build without IMA
* fix: rename `adData` to `data`

---------

Co-authored-by: olivier <olivier.bouillet@ifeelsmart.com>
2023-11-27 21:43:30 +01:00
YangJH
2648502b36
feat: implement startPosition (#3355)
* feat(android): implement startPosition

* feat(ios): implement startPosition

* feat: implement startPosition type

* docs: fix typo

* docs: update startPosition

* refactor: put startPosition inside source prop
- put startPosition inside source prop
- rename existing prop (startTime, endTime)

* docs: update startPosition property description

* fix: fix invalid assignments

* refactor: remove redundant optional chaining

* feat: allow "0" to work too
2023-11-24 12:52:46 +01:00
Krzysztof Moch
9f1bf8f913
docs: add source local file name waring (#3359) 2023-11-17 15:38:32 +01:00
Krzysztof Moch
782e7e0df1
fix(ios): fix external text tracks crashes with m3u8 files (#3330)
* fix(ios): fix crash when using textTracks with m3u8

* docs: add warning to `textTracks` prop

* chore: apply code review

* chore: remove indents
2023-11-17 08:19:39 +01:00
Krzysztof Moch
9054db35d7
feat(ios): add onBandwidthUpdate event (#3331)
* feat(ios): add onBandwidthUpdate event
2023-11-08 22:06:29 +01:00