Commit Graph

51 Commits

Author SHA1 Message Date
edb5c6bcfa Merge remote-tracking branch 'railbird/master' into feat/shaka 2024-10-12 23:52:26 -06:00
d79b5c9a83 Merge remote-tracking branch 'origin/master' into feat/web 2024-10-12 23:40:00 -06:00
Olivier Bouillet
d86adc52f3
Chore: rework ad props (#4220)
* fix: move ad configuration in source
2024-10-10 23:53:39 +02:00
Olivier Bouillet
9a3fcda3b8
feat: add setSource API function fix ads playback (#4185)
* feat: add setSource API function fix ads playback
2024-10-10 22:59:41 +02:00
Krzysztof Moch
0e4c95def9
feat(iOS): rewrite DRM Module (#4136)
* minimal api

* add suport for `getLicense`

* update logic for obtaining `assetId`

* add support for localSourceEncryptionKeyScheme

* fix typo

* fix pendingLicenses key bug

* lint code

* code clean

* code clean

* remove old files

* fix tvOS build

* fix errors loop

* move `localSourceEncryptionKeyScheme` into drm params

* add check for drm type

* use DebugLog

* lint

* update docs

* lint code

* fix bad rebase

* update docs

* fix crashes on simulators

* show error on simulator when using DRM

* fix typos

* code clean
2024-09-20 17:46:10 +02:00
Olivier Bouillet
835186a321
fix(JS): improve loader api to allow function call instead of component (#4171) 2024-09-17 15:58:47 +02:00
Olivier Bouillet
24d90e9ec8
chore(android): move contentStartTime into source prop (#4160) 2024-09-14 19:53:54 +02:00
Olivier Bouillet
84a27f3d9f
fix: refactor side loaded text tracks management (#4158)
* fix: refactor side loaded text tracks management

More textTracks in source.
android/ios: ensure text tracks are not selected by default
android/ios make textTrack field not nullable
clean up doc
check compatibility with the old api
Add comments on deprecated JS apis
Apply API change on basic sample

* chore: fix linter

* fix(ios): fix build with caching & remove warnings
2024-09-13 10:50:33 +02:00
Subin Yang
ca795f298a
feat(android): Support Common Media Client Data (CMCD) (#4034)
* feat(VideoNativeComponent.ts): add support for cmcd configuration in VideoSrc type to enable cmcd feature on android
feat(video.ts): introduce CmcdMode enum and CmcdConfiguration type to define cmcd configuration options

* feat(Video.tsx): add support for CMCD configuration in Video component to handle Content Management and Delivery (CMCD) headers for Android platform.

* feat(CMCDProps.kt): add CMCDProps class to handle CMCD related properties and parsing logic for React Native module

* feat(CMCDConfig.kt): add CMCDConfig class to handle CMCD configuration for ExoPlayer with support for custom data and configuration options.

* feat(ReactExoplayerViewManager.java): add support for CMCD configuration in ReactExoplayerViewManager to enable Content Management and Control Data (CMCD) for better video playback optimization.

* feat(ReactExoplayerView.java): add support for setting CmcdConfiguration.Factory to customize CMCD configuration for media playback

* feat(Source.kt): add support for CMCD properties linked to the source to enhance functionality and data handling

* docs(props.mdx): add documentation for configuring CMCD parameters in the component, including usage examples and default values

* refactor(ReactExoplayerViewManager.java): remove unused PROP_CMCD and prevCmcdConfig variables to clean up code and improve readability

* refactor(Video.tsx): simplify cmcd configuration logic for better readability and maintainability

* docs(props.mdx): improve props documentation for clarity and consistency
feat(props.mdx): add definitions for CmcdMode enum and CmcdData type to enhance understanding of CMCD data structure and usage

* refactor(CMCDProps.kt): refactor CMCDProps class to data class for improved readability and immutability
-  update CMCDProps class to use List instead of Array for properties

* refactor(Video.tsx): refactor createCmcdHeader function to improve code readability and reduce duplication

* fix(CMCDProps.kt): remove import statement for CmcdConfiguration

* feat(ReactExoplayerView.java): add support for CMCD configuration in ReactExoplayerView component
feat(ReactExoplayerViewManager.java): remove redundant CMCD configuration logic from ReactExoplayerViewManager to simplify code and improve maintainability

* fix(Video.tsx): merge _cmcd memo into src memo for optimization
2024-08-22 10:47:51 +02:00
d69729dc04 expose-on-seek-complete (#1)
Some checks failed
Build iOS / Build iOS Example App (push) Has been cancelled
Build iOS / Build iOS Example App With Ads (push) Has been cancelled
Build iOS / Build iOS Example App With Caching (push) Has been cancelled
Check CLang / CLang-Format (push) Has been cancelled
Check iOS / Swift-Lint (push) Has been cancelled
Check iOS / Swift-Format (push) Has been cancelled
Check JS / Check TS (tsc) (push) Has been cancelled
Check JS / Lint JS (eslint, prettier) (push) Has been cancelled
Reviewed-on: #1
2024-08-06 00:11:17 -06:00
Mickael Lecoq
22cfd6cead
fix(android): viewType is ignored when its value is ViewType.TEXTURE (#4031) 2024-08-02 10:50:27 +02:00
EETVApps
2348c5e42c
fix(ios): updated getLicense call to work with new syntax, and fixed spelling error (#4014) (#4042)
* fix(android): updated getLicense call to work with new syntax, and fixed spelling error (#4014)

* fix(android): corrected error with my refactor (#4014)

* fix(android): Removed trailing space (#4014)

* fix(ios): Refactored following review (#4014)

* fix(ios): Lint tidy (#4014)

* fix(ios): Removed incorrect semi-colon (#4014)

* fix(ios): Fixed more lint errors (#4014)

---------

Co-authored-by: Darren Taft <darren.taft@bt.com>
2024-08-02 10:42:20 +02:00
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
Zoe Roux
a72ab331dc
Move video ref type to its own file 2024-07-16 11:33:15 +07:00
YangJH
c2084c2ace
refactor: internal refactor for prepare new arch (#3980)
* chore(js): fix typo

* refactor(js): refactor type code for codegen

* refactor(js): refactor Video component

- parse shutterColor value within JS
- remove internal fullscreen state

* chore(js): add deprecation warning comment

* fix(js): fix return type

* fix(js): fix import path

* refactor(android): apply changed API for new arch

* refactor(ios): apply changed API for new arch

* fix(ios): fix wrong name

* refactor: refactor VideoDecoderProperties

- rename and add wrapper

* refactor(android): Code fixes for backward compatibility with Kotlin
2024-07-12 10:27:42 +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
Olivier Bouillet
264b57aa2e
fix(android): allow chunk less preparation (#3913) 2024-06-20 11:19:35 +02:00
Justin Emery
dc2a2ab863
fix(typescript): type checks on selectedTextTrack, selectedAudioTrack, selectedVideoTrack (#3910)
* Fix type checks on selectedTextTrack and selectedAudioTrack

* Improve logging

* Rename variable for clarity

* Apply same fix to selectedVideoTrack

* Lint fixes

* Update src/Video.tsx

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

* Update src/Video.tsx

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

* Update src/Video.tsx

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

---------

Co-authored-by: Krzysztof Moch <krzysmoch.programs@gmail.com>
Co-authored-by: Olivier Bouillet <62574056+freeboub@users.noreply.github.com>
2024-06-19 11:49:42 +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
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
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
c80164ccdf
Fix(ts): crash seeking to null (#3802)
* fix: avoid crash when seeking to null
2024-05-21 22:15:47 +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
98b4a75a90
fix(android): poster hidding (#3768)
* fix(android): fix poster management
2024-05-14 13:04:44 +02:00
YangJH
f87a7938c6
fix(js): fix onPlaybackStateChanged callback (#3753) 2024-05-10 20:38:34 +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
c59d00a0f0
perf: ensure we do not provide callback to native if no callback provided from app (#3735)
* perf: ensure we do not provide callback to native if no callback provided from app

* perf: remove onIdle Callback

* chore: code review
2024-05-07 11:06:12 +02:00
Olivier Bouillet
518a9a93e0
fix: avoid crash when setting index to 0 to tracks selection (#3721)
* fix(ts): onPlaybackRateChangeData was not correctly typed

* fix: ensure tracks are well displayed in the sample

* fix: avoid crash when setting invalid selected track or index 0
2024-04-30 15:12:37 +02:00
Olivier Bouillet
2285eba8f0
Feat/add rtsp support (#3677)
* feat(android) : add rtsp support
2024-04-16 10:41:39 +02:00
YangJH
e82f9dc24b
fix: prevents crash from occurring when using the selected video track with resolution type (#3664)
* fix: fix video resolution track native crash error

* fix: fix type error
2024-04-07 19:03:37 +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
Krzysztof Moch
9b66e7fdce
fix: fix codegen types (#3636)
* fix: remove string unions from component spec

* fix linter issue

* fix codegen type

* update podspec
2024-04-03 20:49:47 +02:00
YangJH
24c1aab3f5
fix: inject onGetLicense prop properly for detect user defined or not (#3608)
* fix: inject onGetLicense prop properly for detect user defined or not

* fix: fix lint error
2024-03-28 11:22:52 +01:00
Krzysztof Moch
0312afc8ea
fix: remove setNativeProps usage (#3605)
* fix: remove `setNativeProps` usage

* code review
2024-03-28 11:22:04 +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
yungblud
b33e6df496
Fabric (New Architecture) codegen support (#3487)
* feat: implemented codegenConfig on package.json

* chore: moved directory location of Fabric component

* fix: typefix FabricExample

* chore: pod instaslled FabricExample iOS app

* feat: implemented codegen config on package.json

* feat: implemented codegen of specs/VideoNativeComponent

* chore: removed not using type Filter

* feat: removed unnecessary export on codegen tyepes

* Revert "feat: removed unnecessary export on codegen tyepes"

This reverts commit fc243b0ac5c565eda4886cd865c32ba4e812d7ff.

* refactor: fixed types on Video component and modified types with codegen types

* feat: modified codegenNativeComponent naming (RCTVideo)

* feat: pod installed example basic app

* feat: bump up react-native dev dependency version to 0.73.2 for supporting codegen array event params

* feat: support array param types on event callback function codegen types

* chore: pod installed ios basic example

* feat: modified source prop as optional type

* feat: add original src/VideoComponent.ts again

* Revert "feat: add original src/VideoComponent.ts again"

This reverts commit d63ac94e5330f7c7fb50374f65f8f3f4e0a225d7.

* feat: add original src/VideoComponent.ts again with original file name

* feat: git rm src/specs/VideoNativeComponent.ts

* feat: git mv VideoNativeComponent.ts

* feat: git mv src/specs/VideoNativeComponent.ts

* feat: git mv src/VideoNativeComponent.ts src/specs/VideoNativeComponent.ts

* feat: implemented array type handling on android JAVA

* feat: updated iOS requestHeaders parsing native

* feat: use safeGetArray on android, removed not using import too

* feat: temporary commit - reusing enum types for remaining docs types

* feat: implemented mixed type of SelectedTrack.value for JS layer
2024-03-07 11:35:17 +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
Olivier Bouillet
22a2655dca
fix: ensure save doesn't crash on android (#3415)
Co-authored-by: olivier <olivier.bouillet@ifeelsmart.com>
2023-12-10 15:53:48 +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
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
Olivier Bouillet
dfac7a6ed3
Fix(ios): restore caching feature (#3341)
* chore: fix build issue

* fix: try to fix save typings

* chore: fix podspec

* fix: update integration guide for ios Caching

* fix: update sample to test the save function

---------

Co-authored-by: olivier <olivier.bouillet@ifeelsmart.com>
2023-11-13 21:36:16 +01:00
Krzysztof Moch
cdbc856387
feat: add onVolumeChange event (#3322)
* feat: implement `onVolumeChange` event
2023-11-04 18:11:54 +01:00
Olivier Bouillet
0f8467f51d
chore: rework typescript integration (#3304)
* create few new types
* Add missing api

---------

Co-authored-by: olivier <olivier.bouillet@ifeelsmart.com>
Co-authored-by: Krzysztof Moch <krzysmoch.programs@gmail.com>
2023-10-26 08:46:04 +02:00
Krzysztof Moch
9373493d6a
feat(ios): implement onPlaybackStateChanged callback (#3307)
* chore: fix typo

* feat(ios): implement onPlaybackStateChanged

* docs: update onPlaybackStateChanged platforms
2023-10-23 18:23:57 +02:00
Krzysztof Moch
5c3baca1d8
fix: update types (#3288) 2023-10-11 22:15:58 +02:00
Krzysztof Moch
7fd7b3ff32
feat: refactor resize prop handler (#3286) 2023-10-11 21:56:54 +02:00
Konstantin
a855284d8d
feat(tvos): add custom image metadata option for tvos and add missing types for custom metadata properties (#3280)
* fix: add typescript types for custom metadata properties
* chore: add possibility to override image metadata of video playback

---------

Co-authored-by: Olivier Bouillet <62574056+freeboub@users.noreply.github.com>
2023-10-07 15:14:10 +02:00
Krzysztof Moch
067adde124
chore: lint project (#3279)
* chore: update eslint config
* chore: lint lib files
2023-10-07 12:56:35 +02:00