Commit Graph

280 Commits

Author SHA1 Message Date
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
d56b251aef
fix(ios): ensure duration available when playing live (#3710)
* fix(ios): ensure duration is correct when starting a live playback
2024-04-25 11:29:00 +02:00
Krzysztof Moch
efa1c52491
fix(ios): fix sideloading external subtitles (#3690)
* fix(ios): fix subtitles side loading

* update example

* Update examples/basic/src/VideoPlayer.tsx

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

* Update examples/basic/src/VideoPlayer.tsx

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

---------

Co-authored-by: Olivier Bouillet <62574056+freeboub@users.noreply.github.com>
2024-04-19 22:38:52 +02:00
Krzysztof Moch
b5ccc48476
fix(ios): add workaround for TouchableWithoutFeedback (#3688) 2024-04-18 14:18:17 +02:00
YangJH
042e13c1dc
fix(ios): update onPlaybackStateChanged implementation (#3687) 2024-04-18 10:11:15 +02:00
Olivier Bouillet
a0bcdb75d3
chore(ios): remove unnecessary import (#3682)
* fix(ts): onPlaybackRateChangeData was not correctly typed

* fix: ensure tracks are well displayed in the sample

* chore: remove unnecessary import
2024-04-16 14:36:16 +02:00
Olivier Bouillet
e26afac403
fix(ios): workaround for rate change (#3657)
* fix(ts): onPlaybackRateChangeData was not correctly typed

* fix(ios): add a workaround for smooth rate change management
2024-04-07 19:04:43 +02:00
Olivier Bouillet
4c7719a3f5
fix: ensure tracks are available in sample (#3660)
* fix(ts): onPlaybackRateChangeData was not correctly typed

* fix: ensure tracks are well displayed in the sample
2024-04-07 19:02:39 +02:00
Krzysztof Moch
07f71c2fc4
fix(ios): apply PictureInPicture state on start (#3655) 2024-04-05 10:37:00 +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
Gaëtan Kueny
051e884c8f
fix(ios): call PictureInPicture callbacks with native controls (#3603)
* fix(ios): call PictureInPictureStatusChanged callback with native controls

We add RCTPlayerObserver as playerViewController delegate to be notified with PiP lifecycle
should partially fix #3602

* fix(ios): call onRestoreUserInterfaceForPictureInPictureStop callback with native controls

should partially fix #3602
2024-04-04 15:08:48 +02:00
Krzysztof Moch
10b100de44
feat!(ios): remove native dependency promises (#3631) 2024-04-04 13:23:44 +02:00
Olivier Bouillet
75d370742b
fix(ios): fix regression when playing source starting with ph:// (#3630) 2024-03-29 19:47:04 +01:00
Krzysztof Moch
0312afc8ea
fix: remove setNativeProps usage (#3605)
* fix: remove `setNativeProps` usage

* code review
2024-03-28 11:22:04 +01:00
Gaëtan Kueny
bb9e7eb5a5
fix(ios): fix PiP callback (#3601) 2024-03-26 14:10:31 +01:00
YangJH
c9a75f3cde
fix(iOS): fix iOS DRM header parser (#3609) 2024-03-26 13:56:22 +01:00
YangJH
098358076d
fix(iOS): throw when content id defined with empty string (#3612) 2024-03-26 13:55:11 +01:00
YangJH
36bd2e2d71
fix(ios): fix startPosition, cropStart and cropEnd to handle float values correctly (#3589)
* refactor(ios): refactor setPlaybackRange function

* fix(ios): fix props to handle float values correctly

- fix startPosition, cropStart, cropEnd

* refactor(ios): apply lint
2024-03-22 13:43:46 +01:00
Olivier Bouillet
41c6785ee8
fix(ios): ensure playback stopped in background (#3587)
* 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

* doc: keep previous doc and add more info

* fix: do not pause playback in handlePlaybackLikelyToKeepUp

and review onBuffer event (not yet clean)

---------

Co-authored-by: Krzysztof Moch <krzysmoch.programs@gmail.com>
2024-03-15 12:02:17 +01:00
Olivier Bouillet
429fddf3b0
Fix(ios): fix real time issue when fast zapping (#3582)
* fix(ios): fix real time issue when doing fast zapping

* fix(ios): fix delay implementation (timing was not applied correctly)

* chore: fix random crash in sample

* chore: fix linter
2024-03-14 11:46:45 +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
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
Krzysztof Moch
90b31af2c9
fix(ios): don't crop video when in repeat mode (#3575) 2024-03-10 21:12:47 +01:00
Krzysztof Moch
46c8c498c4
fix(ios): fix missing bridge in bridgeless mode (#3570) 2024-03-07 20:16:11 +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
jerrylc
16f3cdbd9a
fix(ios): current release volume change observer (#3565)
Co-authored-by: jerrylc.liu <jerrylc.liu@dji.com>
2024-03-06 23:55:44 +01:00
Gaëtan Kueny
b73baad2c2
fix(ios): add text tracks only if we successfully insertTimeRage (#3557)
insertTimeRage can fail & if we add failed textTrack to our validTextTracks array, video can crash later on selectTextTrack
we also add en empty textTrack only we we have validTextTrack

related to https://github.com/react-native-video/react-native-video/issues/3480
2024-03-04 10:43:33 +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
Gaëtan Kueny
4d4b56c05d
fix(ios): Do not crash when accessLog return nil (#3549)
accessLog method can return nil if no logging information are currently available (see https://developer.apple.com/documentation/avfoundation/avplayeritem/1388499-accesslog).
So we handle this case & do not call onVideoBandwidthUpdate

fix https://github.com/react-native-video/react-native-video/issues/3424
2024-02-29 14:40:11 +01:00
Krzysztof Moch
2c0e009876
fix(ios): apply cropStart when in repeat mode (#3525) 2024-02-08 14:59:33 +01:00
Krzysztof Moch
9306d9a15d
fix(ios): fix tvOS build (#3524) 2024-02-08 14:59:13 +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
53068ddd41
fix(ios): fix pip memory leak (#3506)
* fix(ios): fix pip memory leak

* lint code
2024-01-30 08:33:33 +01:00
YangJH
e63c7cbd30
refactor(ios): remove type assertion within setupPipController (#3493)
* refactor(ios): remove type assertion within setupPipController

* lint: apply swift lint
2024-01-24 07:54:58 +01:00
Krzysztof Moch
cf3ebb7f15
feat: add visionOS support (#3425)
* feat: add visionOS to target platforms

* disable unsupported API

* add temporary `promises` patches

* fix(visionOS): update promises patches

* apply code review suggestions

* format code
2024-01-15 08:04:29 +01:00
Bryan
8f1bdb7c36
Externally loaded text tracks not loading properly (#3461)
* fix text tracks

* keep map

* use where

* update change log

* fix build error
2024-01-15 07:31:22 +01:00
Jordan Grant
045f5fa008
fix(ios): remove extra dismissFullscreenPlayer declaration (#3474) 2024-01-15 07:31:00 +01:00
Kubessandra
3f63c161eb
fix(ios): currentPlaybackTime in ms and not seconds (#3472) 2024-01-14 03:08:34 +01:00
Krzysztof Moch
5aaa53d8b8
feat(ios): migrate from deprecated methods (#3444)
* feat(ios): migrate from deprecated methods

* fix types
2024-01-06 20:06:53 +01:00
Krzysztof Moch
2ed3949307
chore(linter/swift): add shorthand_optional_binding rule (#3456)
* chore(linter/swift): add `shorthand_optional_binding` rule

* lint code
2024-01-04 20:16:23 +01:00
Krzysztof Moch
481cc71eda
feat(ios): update timed metadata handler (#3449)
* feat(ios): update timedmetadata handler

* chore: move metadata output delegate to main queue

* code clean

* apply code review nit
2024-01-04 14:14:51 +01:00
Krzysztof Moch
f35727f30e
feat(ios): update the way to get keyWindow (#3448)
* feat(ios): update the way to get `keyWindow`

* lint
2023-12-28 12:58:25 +01:00
Konstantin
0723481fee
fix(ios): revert ios url encoding as this breaks encoded urls (#3440) 2023-12-24 14:32:24 +01:00
Krzysztof Moch
800aee09de
chore: lint project (#3395)
* chore: format swift code
* chore: format clang code
* chore: format kotlin code
* refactor: rename folder "API" to "api"
2023-12-07 08:47:40 +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
JuozasP
de4159f0c2
fix(ios): check for ios url query encoding (#3384)
Co-authored-by: Juozas Petkelis <juozas.petkelis@kilo.health>
2023-11-26 21:20:29 +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
Axel Vencatareddy
364944b329
BREAK: fix(android): harmonize IMAAdEventType between iOS and Android (#3373) 2023-11-23 08:45:47 +01:00
YangJH
11f62013e3
fix(ios): fix pip(when player doesn't fill screen) (#3363) 2023-11-20 08:43:35 +01:00