* 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
* 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>
* 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>
* 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.
* 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>
* [Fix] Replace _loadingRequest instance with _loadingRequests dictionary to support multiple concurrent requests
* Remove stored finished requests from dictionary
* Keep contentId as is, and send loadingRequest.url in licenseUrl.
* Update DRM.md
---------
Co-authored-by: Facundo Gutierrez <facundo.gutierrez@tcc.com.uy>
Converts iOS implementation from Objective-c to Swift
# During the conversion process some updates to the code structure were also made
- Modularize codebase from single file to smaller focused files
- Untangled large nested IF statements
- Added more null checks, since Swift is more strict with null pointers
- Added property to allow for decoding of local video sources with self contained key for offline playback
- Updates example apps to test react-native 0.63.4 and uses auto native dependency imports for android and ios
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)
* 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>
Test Plan:
- Run on ipad
- test out onIsPictureInPictureSupported, onIsPictureInPictureActive, restoreUserInterfaceForPictureInPictureStop, startPictureInPicture, stopPictureInPicture