Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AudoFocus pausing video when attempting to play #2311

Merged

Conversation

armands-malejevs
Copy link
Collaborator

Fix AudioFocus bug that could cause the player to stop responding to play/pause in some instances.

Fixes issue #1945

This was caused by the player requesting audio focus on each play (un-pause) and that resulted in a small window of Audio focus loss and then gain. The focus loss results in the player being paused while the player was supposed to play at the time. The solution is to keep track of Audio focus and not request new focus if we already have it.

@deepak-jha-kgp
Copy link

Hi @armadilio3 Do you think this could be a reason for #2312 as well?

@armands-malejevs
Copy link
Collaborator Author

@deepak-jha-kgp It's possible that the lower end devices don't handle focus loss/gain very quickly and could start stuttering. Looking at the video the symptoms seem to be similar so its possible that this would fix the issue, but the only way to make sure would be using the player with these changes included and checking if its still reproducible.

@deepak-jha-kgp
Copy link

Thank you @armadilio3. I will implement this and get back to you

@t-fritsch
Copy link

Tested with RN 0.64 + react-native-video-controls 2.7.1 and this PR seems to work just fine.
Thanks a lot

FreeIess pushed a commit to FreeIess/react-native-video-new that referenced this pull request Jun 16, 2021
@nickfujita nickfujita merged commit fcc66df into TheWidlarzGroup:master Jun 24, 2021
@ajayAloha
Copy link

Hi @armadilio3 Thanks a ton for fixing this. I have wasted a day trying to figure out the issue. :)

renovate bot referenced this pull request in valora-inc/wallet Nov 22, 2023
…4499)

[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[react-native-video](https://github.com/react-native-community/react-native-video)
| [`^6.0.0-alpha.7` ->
`^6.0.0-alpha.11`](https://renovatebot.com/diffs/npm/react-native-video/6.0.0-alpha.7/6.0.0-alpha.11)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/react-native-video/6.0.0-alpha.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-native-video/6.0.0-alpha.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-native-video/6.0.0-alpha.7/6.0.0-alpha.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-native-video/6.0.0-alpha.7/6.0.0-alpha.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>react-native-community/react-native-video
(react-native-video)</summary>

###
[`v6.0.0-alpha.11`](https://github.com/react-native-community/react-native-video/blob/HEAD/CHANGELOG.md#600-alpha11-2023-11-15)

[Compare
Source](https://github.com/react-native-community/react-native-video/compare/v6.0.0-alpha.10...v6.0.0-alpha.11)

##### Bug Fixes

- fix bad package release process
([#&#8203;3347](https://github.com/react-native-video/react-native-video/issues/3347))
([f961f95](https://github.com/react-native-video/react-native-video/commit/f961f952a483192ee3de1f7bae59419ec6ddc5b7))

###
[`v6.0.0-alpha.10`](https://github.com/react-native-community/react-native-video/blob/HEAD/CHANGELOG.md#600-alpha10-2023-11-13)

[Compare
Source](https://github.com/react-native-community/react-native-video/compare/v6.0.0-alpha.9...v6.0.0-alpha.10)

##### Bug Fixes

- fixes where Android's muted prop behavior differs from iOS
([#&#8203;3339](https://github.com/react-native-video/react-native-video/issues/3339))
([8fbdc28](https://github.com/react-native-video/react-native-video/commit/8fbdc28a73a0b3ffd3691ef0c8cf523c760ae288))
- **ios:** fix wrong fullscreen method definition
([#&#8203;3338](https://github.com/react-native-video/react-native-video/issues/3338))
([7f49b56](https://github.com/react-native-video/react-native-video/commit/7f49b560278262fb4276f931404c70672a6445c8))
- **ios:** player is frozen after re-focusing on the app
([#&#8203;3326](https://github.com/react-native-video/react-native-video/issues/3326))
([722ae34](https://github.com/react-native-video/react-native-video/commit/722ae3477a68aecb812b26d71ea22a17dda71f50))

##### Features

- add `onVolumeChange` event
([#&#8203;3322](https://github.com/react-native-video/react-native-video/issues/3322))
([cdbc856](https://github.com/react-native-video/react-native-video/commit/cdbc85638789da0002cdadb13190963d4c1332c2))
- add release-it
([#&#8203;3342](https://github.com/react-native-video/react-native-video/issues/3342))
([da27089](https://github.com/react-native-video/react-native-video/commit/da270891fbce485bb132825a336638f2af98408d))
- **ios:** add onBandwidthUpdate event
([#&#8203;3331](https://github.com/react-native-video/react-native-video/issues/3331))
([9054db3](https://github.com/react-native-video/react-native-video/commit/9054db35d7d5e4e6d54739fc9349576c03522d7c))

#### Changelog

#### Next

- Android, iOS: add onVolumeChange event
[#&#8203;3322](https://github.com/react-native-community/react-native-video/issues/3322)

##### Version 6.0.0-alpha.9

- All: add built-in typescript support
[#&#8203;3266](https://github.com/react-native-video/react-native-video/pull/3266)
- All: update documentation generation
[#&#8203;3296](https://github.com/react-native-video/react-native-video/pull/3296)
- **BREAKING CHANGE**❗️Android: update isCodecSupported to return enum
[#&#8203;3254](https://github.com/react-native-video/react-native-video/pull/3254)
- Android: use explicit not-exported flag for AudioBecomingNoisyReceiver
[#&#8203;3327](https://github.com/react-native-video/react-native-video/pull/3327)
- Android: remove kotlin-android-extensions
[#&#8203;3299](https://github.com/react-native-video/react-native-video/pull/3299)
- Android: ensure audio volume is changed in UI thread
[3292](https://github.com/react-native-video/react-native-video/pull/3292)
-   Android: multiple internal refactor and switch to kotlin
- Android: refactor log management and add an option to increase log
verbosity
[#&#8203;3277](https://github.com/react-native-video/react-native-video/pull/3277)
-   iOS: Fix audio session category when not using the audioOutput prop
- iOS: implement onPlaybackStateChanged callback
[#&#8203;3307](https://github.com/react-native-video/react-native-video/pull/3307)
- iOS: remove false calls at onPlaybackRateChange
[#&#8203;3306](https://github.com/react-native-video/react-native-video/pull/3306)
- iOS: audio does not work with headphones
[#&#8203;3284](https://github.com/react-native-video/react-native-video/pull/3284)
- iOS: Resuming video ad after closing the in-app browser on iOS
[#&#8203;3275](https://github.com/react-native-video/react-native-video/pull/3275)
- iOS, Android: expose playback functions to ref
[#&#8203;3245](https://github.com/react-native-video/react-native-video/pull/3245)
- tvOS: fix build:
[#&#8203;3276](https://github.com/react-native-video/react-native-video/pull/3276)
- Windows: fix build error from over-specified SDK version
[#&#8203;3246](https://github.com/react-native-video/react-native-video/pull/3246)
- Windows: fix `onError` not being raised
[#&#8203;3247](https://github.com/react-native-video/react-native-video/pull/3247)

##### Version 6.0.0-alpha.8

- All: Playing audio over earpiece
[#&#8203;2887](https://github.com/react-native-video/react-native-video/issues/2887)
- All: Prepare for fabric
[#&#8203;3175](https://github.com/react-native-video/react-native-video/pull/3175)
[#]()
- iOS: Fix Pip
[#&#8203;3221](https://github.com/react-native-video/react-native-video/pull/3221)
- iOS: Fix regression in presentFullscreenPlayer &
dismissFullscreenPlayer
[#&#8203;3230](https://github.com/react-native-video/react-native-video/pull/3230)
- tvOS: Fix build
[#&#8203;3207](https://github.com/react-native-video/react-native-video/pull/3207)
- tvOS: Add sample
[#&#8203;3208](https://github.com/react-native-video/react-native-video/pull/3208)
- tvOS: Allow chapter customization
[#&#8203;3216](https://github.com/react-native-video/react-native-video/pull/3216)
- doc: Fix internal links
[#&#8203;3229](https://github.com/react-native-video/react-native-video/pull/3229)

##### Version 6.0.0-alpha.7

- All: clean JS warnings
([https://github.com/react-native-video/react-native-video/pull/3183](https://github.com/react-native-video/react-native-video/pull/3183))
- Android: Add shutterView color configurtion
([https://github.com/react-native-video/react-native-video/pull/3179](https://github.com/react-native-video/react-native-video/pull/3179))
- Android: React native 0.73 support
([https://github.com/react-native-video/react-native-video/pull/3163](https://github.com/react-native-video/react-native-video/pull/3163))
- Android: Fix memory leaks from AudioManager
[#&#8203;3123](https://github.com/react-native-video/react-native-video/pull/3123)
- Android: Fixed syntax error
[#&#8203;3182](https://github.com/react-native-video/react-native-video/issues/3182)
- iOS: Fix freeze at playback startup
([https://github.com/react-native-video/react-native-video/pull/3173](https://github.com/react-native-video/react-native-video/pull/3173))
- iOS: Various safety checks
([https://github.com/react-native-video/react-native-video/pull/3168](https://github.com/react-native-video/react-native-video/pull/3168))

##### Version 6.0.0-alpha.6

- Feature: Video range support
[#&#8203;3030](https://github.com/react-native-video/react-native-video/pull/3030)
- iOS: remove undocumented `currentTime` property
[#&#8203;3064](https://github.com/react-native-video/react-native-video/pull/3064)
- iOS: make sure that the audio in ads is muted when the player is
muted.
[#&#8203;3068](https://github.com/react-native-video/react-native-video/pull/3077)
-   iOS: make IMA build optionnal

##### Version 6.0.0-alpha.5

- iOS: ensure controls are not displayed when disabled by user
[#&#8203;3017](https://github.com/react-native-video/react-native-video/pull/3017)
- iOS: app crashes on call to presentFullScreenPlayer
[#&#8203;2808](https://github.com/react-native-video/react-native-video/pull/2971)
- Android: Fix publicated progress handler causing duplicated progress
event
[#&#8203;2972](https://github.com/react-native-video/react-native-video/pull/2972)
- Android: Fix audio/Subtitle tracks selection
[#&#8203;2979](https://github.com/react-native-video/react-native-video/pull/2979)
- Android: add new events on tracks changed to be notified of
audio/text/video Tracks update during playback
[2806](https://github.com/react-native-video/react-native-video/pull/2806)
- Feature: Add VAST support for AVOD
[#&#8203;2923](https://github.com/react-native-video/react-native-video/pull/2923)
- Sample: Upgrade react-native version of basic sample
[#&#8203;2960](https://github.com/react-native-video/react-native-video/pull/2960)

##### Version 6.0.0-alpha.4

- ensure src is always provided to native player even if it is invalid
[#&#8203;2857](https://github.com/react-native-video/react-native-video/pull/2857)
- Sample: Add react-native-video controls support
[#&#8203;2852](https://github.com/react-native-video/react-native-video/pull/2852)
- Android: Switch Google's maven repository to default `google()`
[#&#8203;2860](https://github.com/react-native-video/react-native-video/pull/2860)
- Android: Implement focusable prop so the video view can toggle whether
it is focusable for non-touch devices
[#&#8203;2819](https://github.com/react-native-video/react-native-video/issues/2819)
- Android: fix linter warning
\[[#&#8203;2891](https://github.com/react-native-community/react-native-video/issues/2891)]
([https://github.com/react-native-video/react-native-video/pull/2891](https://github.com/react-native-video/react-native-video/pull/2891))
- Fix iOS RCTSwiftLog naming collision
[#&#8203;2868](https://github.com/react-native-video/react-native-video/issues/2868)
- Added "homepage" to package.json
[#&#8203;2882](https://github.com/react-native-video/react-native-video/pull/2882)
- Fix regression when fullscreen prop is used combined with controls
[#&#8203;2911](https://github.com/react-native-video/react-native-video/pull/2911)
- Fix: memory leak issue on iOS
[#&#8203;2907](https://github.com/react-native-video/react-native-video/pull/2907)
- Fix setting text tracks before player is initialized on iOS
[#&#8203;2935](https://github.com/react-native-video/react-native-video/pull/2935)

##### Version 6.0.0-alpha.3

- Fix ios build
[#&#8203;2854](https://github.com/react-native-video/react-native-video/pull/2854)

##### Version 6.0.0-alpha.2

- Upgrade ExoPlayer to 2.18.1
[#&#8203;2846](https://github.com/react-native-video/react-native-video/pull/2846)
- Feature add new APIs to query supported features of device decoder
(widevine level & codec capabilities) on android
[#&#8203;2740](https://github.com/react-native-video/react-native-video/pull/2740)
- Feature add support of subtitle styling on android
[#&#8203;2759](https://github.com/react-native-video/react-native-video/pull/2759)
- Fix Android
[#&#8203;2690](https://github.com/react-native-community/react-native-video/issues/2690)
ensure onEnd is not sent twice
[#&#8203;2690](https://github.com/react-native-video/react-native-video/issues/2690)
- Fix Exoplayer progress not reported when paused
[#&#8203;2664](https://github.com/react-native-video/react-native-video/pull/2664)
- Call playbackRateChange onPlay and onPause
[#&#8203;1493](https://github.com/react-native-video/react-native-video/pull/1493)
- Fix being unable to disable sideloaded texttracks in the AVPlayer
[#&#8203;2679](https://github.com/react-native-video/react-native-video/pull/2679)
- Fixed crash when iOS seek method called reject on the promise
[#&#8203;2743](https://github.com/react-native-video/react-native-video/pull/2743)
- Fix maxBitRate property being ignored on Android
[#&#8203;2670](https://github.com/react-native-video/react-native-video/pull/2670)
- Fix crash when the source is a cameraroll
\[[#&#8203;2639](https://github.com/react-native-community/react-native-video/issues/2639)]
([https://github.com/react-native-video/react-native-video/pull/2639](https://github.com/react-native-video/react-native-video/pull/2639))
- Fix IOS UI frame drop on loading video
\[[#&#8203;2848](https://github.com/react-native-community/react-native-video/issues/2848)]
([https://github.com/react-native-video/react-native-video/pull/2848](https://github.com/react-native-video/react-native-video/pull/2848))

##### Version 6.0.0-alpha.1

- Remove Android MediaPlayer support
[#&#8203;2724](https://github.com/react-native-video/react-native-video/pull/2724)
**WARNING**: when switching from older version to V6, you need to remove
all refrerences of android-exoplayer. This android-exoplayer folder has
been renamed to android. Exoplayer is now the only player implementation
supported.

- Replace Image.propTypes with ImagePropTypes.
[#&#8203;2718](https://github.com/react-native-video/react-native-video/pull/2718)

- Fix iOS build caused by type mismatch
[#&#8203;2720](https://github.com/react-native-video/react-native-video/pull/2720)

- ERROR TypeError: undefined is not an object (evaluating
'\_reactNative.Image.propTypes.resizeMode')
[#&#8203;2714](https://github.com/react-native-video/react-native-video/pull/2714)

- Fix video endless loop when repeat set to false or not specified.
[#&#8203;2329](https://github.com/react-native-video/react-native-video/pull/2329)

##### Version 6.0.0-alpha.0

- Support disabling buffering
[#&#8203;2689](https://github.com/react-native-video/react-native-video/pull/2689)
- Fix AudioFocus bug that could cause the player to stop responding to
play/pause in some instances.
[#&#8203;2689](https://github.com/react-native-video/react-native-video/pull/2689)
- Fix player crashing when it is being cleared.
[#&#8203;2689](https://github.com/react-native-video/react-native-video/pull/2689)
- Add support for customising back buffer duration and handle network
errors gracefully to prevent releasing the player when network is lost.
[#&#8203;2689](https://github.com/react-native-video/react-native-video/pull/2689)
- Allow player to be init before source is provided, and later update
once a source is provided.
[#&#8203;2689](https://github.com/react-native-video/react-native-video/pull/2689)
- Adds handling for providing a empty source in order to stop playback
and clear out any existing content
[#&#8203;2689](https://github.com/react-native-video/react-native-video/pull/2689)
- Add support for detecting if format is supported and exclude
unsupported resolutions from auto quality selection and video track info
in RN.
[#&#8203;2689](https://github.com/react-native-video/react-native-video/pull/2689)
- Improve error handling
[#&#8203;2689](https://github.com/react-native-video/react-native-video/pull/2689)
- Add support for L1 to L3 Widevine fallback if playback fails
initially.
[#&#8203;2689](https://github.com/react-native-video/react-native-video/pull/2689)
- Reduce buffer size based on available heap
[#&#8203;2689](https://github.com/react-native-video/react-native-video/pull/2689)
- Force garbage collection when there is no available memory
[#&#8203;2689](https://github.com/react-native-video/react-native-video/pull/2689)
- Improve memory usage
[#&#8203;2689](https://github.com/react-native-video/react-native-video/pull/2689)
- Support disabling screen recording
[#&#8203;2689](https://github.com/react-native-video/react-native-video/pull/2689)
- Improved error capturing
[#&#8203;2689](https://github.com/react-native-video/react-native-video/pull/2689)
- Fix DRM init crashes
[#&#8203;2689](https://github.com/react-native-video/react-native-video/pull/2689)
- Improve progress reporting
[#&#8203;2689](https://github.com/react-native-video/react-native-video/pull/2689)
- Fix progress loss when network connection is regained
[#&#8203;2689](https://github.com/react-native-video/react-native-video/pull/2689)
- Add Google's maven repository to avoid build error
[#&#8203;2552](https://github.com/react-native-video/react-native-video/pull/2552)
- Fix iOS 15.4 HLS playback race condition
[#&#8203;2633](https://github.com/react-native-video/react-native-video/pull/2633)
- Fix app crash from NPE in Exoplayer error handler
[#&#8203;2575](https://github.com/react-native-video/react-native-video/pull/2575)
- Fix default closed captioning behavior for Android ExoPlayer
[#&#8203;2181](https://github.com/react-native-video/react-native-video/pull/2181)
- Disable pipController init if pictureInPicture is false
[#&#8203;2645](https://github.com/react-native-video/react-native-video/pull/2645)
- Make sure modifiers are applied before playing
[#&#8203;2395](https://github.com/react-native-video/react-native-video/pull/2395)
- Better support newer versions of RNW (64 and newer)
[#&#8203;2535](https://github.com/react-native-video/react-native-video/pull/2535)
- Fix nil string uri parameter error
[#&#8203;695](https://github.com/react-native-video/react-native-video/pull/695)
- (Breaking) Bump shaka-player to 3.3.2
[#&#8203;2587](https://github.com/react-native-video/react-native-video/pull/2587)
- Improve basic player example on android
[#&#8203;2662](https://github.com/react-native-video/react-native-video/pull/2662)
- Ensure we always use `hideShutterView` before showing the
`shutterView` on Android
[#&#8203;2609](https://github.com/react-native-video/react-native-video/pull/2609)
- Convert iOS implementation to Swift
[#&#8203;2527](https://github.com/react-native-video/react-native-video/pull/2527)
- Add iOS support for decoding offline sources
[#&#8203;2527](https://github.com/react-native-video/react-native-video/pull/2527)
- Update basic example applications (React Native 0.63.4)
[#&#8203;2527](https://github.com/react-native-video/react-native-video/pull/2527)
- Upgrade ExoPlayer to 2.17.1
[#&#8203;2498](https://github.com/react-native-video/react-native-video/pull/2498)
- Fix volume reset issue in exoPlayer
[#&#8203;2371](https://github.com/react-native-video/react-native-video/pull/2371)
- Change WindowsTargetPlatformVersion to 10.0
[#&#8203;2706](https://github.com/react-native-video/react-native-video/pull/2706)
- Fixed Android seeking bug
[#&#8203;2712](https://github.com/react-native-video/react-native-video/pull/2712)
- Fixed `onReadyForDisplay` not being called
[#&#8203;2721](https://github.com/react-native-video/react-native-video/pull/2721)
- Fix type of `_eventDispatcher` on iOS target to match
`bridge.eventDispatcher()`
[#&#8203;2720](https://github.com/react-native-video/react-native-video/pull/2720)

##### Version 5.2.0

-   Fix for tvOS native audio menu language selector
- Update ExoPlayer to allow pre-init and content clear
\[[#&#8203;2412](https://github.com/react-native-community/react-native-video/issues/2412)]
([https://github.com/react-native-video/react-native-video/pull/2412](https://github.com/react-native-video/react-native-video/pull/2412))
- iOS rate is reset to 1.0 after play/pause
\[[#&#8203;2167](https://github.com/react-native-community/react-native-video/issues/2167)]
([https://github.com/react-native-video/react-native-video/pull/2167](https://github.com/react-native-video/react-native-video/pull/2167))
- Upgrade ExoPlayer to 2.13.2
\[[#&#8203;2317](https://github.com/react-native-community/react-native-video/issues/2317)]
([https://github.com/react-native-video/react-native-video/pull/2317](https://github.com/react-native-video/react-native-video/pull/2317))
- Fix AudioFocus pausing video when attempting to play
\[[#&#8203;2311](https://github.com/react-native-community/react-native-video/issues/2311)]
([https://github.com/react-native-video/react-native-video/pull/2311](https://github.com/react-native-video/react-native-video/pull/2311))

##### Version 5.1.0-alpha9

- Add ARM64 support for windows
[#&#8203;2137](https://github.com/react-native-community/react-native-video/pull/2137)
- Fix deprecated API bug for windows
[#&#8203;2119](https://github.com/react-native-video/react-native-video/pull/2119)
- Added `rate` property and autolinking support for windows
[#&#8203;2206](https://github.com/react-native-video/react-native-video/pull/2206)

##### Version 5.1.0-alpha8

- Fixing ID3 Frame Error When Receiving EventMessage in TimedMetadata
[#&#8203;2116](https://github.com/react-native-community/react-native-video/pull/2116)

##### Version 5.1.0-alpha7

- Basic support for DRM on iOS and Android
[#&#8203;1445](https://github.com/react-native-community/react-native-video/pull/1445)

##### Version 5.1.0-alpha6

- Fix iOS bug which would break size of views when video is displayed
with controls on a non full-screen React view.
[#&#8203;1931](https://github.com/react-native-community/react-native-video/pull/1931)
- Fix video dimensions being undefined when playing HLS in ios.
[#&#8203;1992](https://github.com/react-native-community/react-native-video/pull/1992)
- Add support for audio mix with other apps for iOS.
[#&#8203;1978](https://github.com/react-native-community/react-native-video/pull/1978)
- Properly implement pending seek for iOS.
[#&#8203;1994](https://github.com/react-native-community/react-native-video/pull/1994)
- Added `preferredForwardBufferDuration` (iOS) - the duration the player
should buffer media from the network ahead of the playhead to guard
against playback disruption.
([#&#8203;1944](https://github.com/react-native-community/react-native-video/issues/1944))
- Added `currentPlaybackTime` (Android ExoPlayer, iOS) - when playing an
HLS live stream with a `EXT-X-PROGRAM-DATE-TIME` tag configured, then
this property will contain the epoch value in msec.
([#&#8203;1944](https://github.com/react-native-community/react-native-video/issues/1944))
- Added `trackId` (Android ExoPlayer) - Configure an identifier for the
video stream to link the playback context to the events emitted.
([#&#8203;1944](https://github.com/react-native-community/react-native-video/issues/1944))
- Added preventsDisplaySleepDuringVideoPlayback
([#&#8203;2019](https://github.com/react-native-community/react-native-video/issues/2019))
- Reverted the JS fullscreening for Android.
[#&#8203;2013](https://github.com/react-native-community/react-native-video/pull/2013)
- Set iOS request headers without needing to edit RCTVideo.m.
[#&#8203;2014](https://github.com/react-native-community/react-native-video/pull/2014)
- Fix exoplayer aspect ratio update on source changes
[#&#8203;2053](https://github.com/react-native-community/react-native-video/pull/2053)

##### Version 5.1.0-alpha5

- Add support for react-native Windows
Cpp/WinRT(https://github.com/react-native-community/react-native-video/pull/1893)-video/pull/1893\))

##### Version 5.1.0-alpha4

- Fix android play/pause bug related to full-screen mode
[#&#8203;1916](https://github.com/react-native-community/react-native-video/pull/1916)

##### Version 5.1.0-alpha3

- Improve Android Audio Focus
[#&#8203;1897](https://github.com/react-native-community/react-native-video/pull/1897)

##### Version 5.1.0-alpha2

- Added support for full-screen functionality in Android Exoplayer
[#&#8203;1730](https://github.com/react-native-community/react-native-video/pull/1730)

##### Version 5.1.0-alpha1

- Fixed Exoplayer doesn't work with mute=true (Android).
[#&#8203;1696](https://github.com/react-native-community/react-native-video/pull/1696)
- Added support for automaticallyWaitsToMinimizeStalling property (iOS)
[#&#8203;1723](https://github.com/react-native-community/react-native-video/pull/1723)
- Bump Exoplayer to 2.10.4, remove deprecated usages of Exoplayer
methods (Android).
[#&#8203;1753](https://github.com/react-native-community/react-native-video/pull/1753)
- Preserve Exoplayer BandwidthMeter instance across video plays, this
should noticeably improve streaming bandwidth detection (Android).

##### Version 5.0.2

- Fix crash when RCTVideo's superclass doesn't observe the keyPath
'frame' (iOS)
[#&#8203;1720](https://github.com/react-native-community/react-native-video/pull/1720)

##### Version 5.0.1

-   Fix AndroidX Support bad merge

##### Version 5.0.0 \[Deprecated]

-   AndroidX Support

##### Version 4.4.4

-   Handle racing conditions when props are settled on Exoplayer

##### Version 4.4.3

- Fix mute/unmute when controls are present (iOS)
[#&#8203;1654](https://github.com/react-native-community/react-native-video/pull/1654)
- Fix Android videos being able to play with background music/audio from
other apps.
- Fixed memory leak on iOS when using `controls`
[#&#8203;1647](https://github.com/react-native-community/react-native-video/pull/1647)
- (Android) Update gradle and target SDK
[#&#8203;1629](https://github.com/react-native-community/react-native-video/pull/1629)
- Fix iOS stressed mount/unmount crash
[#&#8203;1646](https://github.com/react-native-community/react-native-video/pull/1646)

##### Version 4.4.2

- Change compileOnly to implementation on gradle (for newer gradle
versions and react-native 0.59 support)
[#&#8203;1592](https://github.com/react-native-community/react-native-video/pull/1592)
- Replaced RCTBubblingEventBlock events by RCTDirectEventBlock to avoid
event name collisions
[#&#8203;1625](https://github.com/react-native-community/react-native-video/pull/1625)
- Added `onPlaybackRateChange` to README
[#&#8203;1578](https://github.com/react-native-community/react-native-video/pull/1578)
- Added `onReadyForDisplay` to README
[#&#8203;1627](https://github.com/react-native-community/react-native-video/pull/1627)
- Improved handling of poster image. Fixes bug with displaying video and
poster simultaneously.
[#&#8203;1627](https://github.com/react-native-community/react-native-video/pull/1627)
- Fix background audio stopping on iOS when using `controls`
[#&#8203;1614](https://github.com/react-native-community/react-native-video/pull/1614)

##### Version 4.4.1

- Fix tvOS picture-in-picture compilation regression
[#&#8203;1518](https://github.com/react-native-community/react-native-video/pull/1518)
- fullscreen rotation issues with iOS built-in controls
[#&#8203;1441](https://github.com/react-native-community/react-native-video/pull/1441)
- Fix player freeze when playing audio files on ExoPlayer
[#&#8203;1529](https://github.com/react-native-community/react-native-video/pull/1529)

##### Version 4.4.0

- Fix runtime warning by replacing `UIManager.RCTVideo` with
`UIManager.getViewManagerConfig('RCTVideo')` (and ensuring backwards
compat)
[#&#8203;1487](https://github.com/react-native-community/react-native-video/pull/1487)
- Fix loading package resolved videos when using video-caching
[#&#8203;1438](https://github.com/react-native-community/react-native-video/pull/1438)
- Fix "message sent to deallocated instance" crash on ios
[#&#8203;1482](https://github.com/react-native-community/react-native-video/pull/1482)
- Display a warning when source is empty
[#&#8203;1478](https://github.com/react-native-community/react-native-video/pull/1478)
- Don't crash on iOS for an empty source
[#&#8203;1246](https://github.com/react-native-community/react-native-video/pull/1246)
- Recover from from transient internet failures when loading on
ExoPlayer
[#&#8203;1448](https://github.com/react-native-community/react-native-video/pull/1448)
- Add controls support for ExoPlayer
[#&#8203;1414](https://github.com/react-native-community/react-native-video/pull/1414)
- Fix check for text tracks when iOS caching enabled
[#&#8203;1387](https://github.com/react-native-community/react-native-video/pull/1387)
- Add support for Picture in Picture on iOS
[#&#8203;1325](https://github.com/react-native-community/react-native-video/pull/1325)
- Fix UIManager undefined variable
[#&#8203;1488](https://github.com/react-native-community/react-native-video/pull/1488)

##### Version 4.3.0

- Fix iOS video not displaying after switching source
[#&#8203;1395](https://github.com/react-native-community/react-native-video/pull/1395)
- Add the filterEnabled flag, fixes iOS video start time regression
[#&#8203;1384](https://github.com/react-native-community/react-native-video/pull/1384)
- Fix text not appearing in release builds of Android apps
[#&#8203;1373](https://github.com/react-native-community/react-native-video/pull/1373)
- Update to ExoPlayer 2.9.3
[#&#8203;1406](https://github.com/react-native-community/react-native-video/pull/1406)
- Add video track selection & onBandwidthUpdate
[#&#8203;1199](https://github.com/react-native-community/react-native-video/pull/1199)
- Recovery from transient internet failures and props to configure the
custom retry count
[#&#8203;1448](https://github.com/react-native-community/react-native-video/pull/1448)

##### Version 4.2.0

- Don't initialize filters on iOS unless a filter is set. This was
causing a startup performance regression
[#&#8203;1360](https://github.com/react-native-community/react-native-video/pull/1360)
- Support setting the maxBitRate
[#&#8203;1310](https://github.com/react-native-community/react-native-video/pull/1310)
- Fix useTextureView not defaulting to true
[#&#8203;1383](https://github.com/react-native-community/react-native-video/pull/1383)
- Fix crash on MediaPlayer w/ Android 4.4 & avoid memory leak
[#&#8203;1328](https://github.com/react-native-community/react-native-video/pull/1328)

##### Version 4.1.0

- Generate onSeek on Android ExoPlayer & MediaPlayer after seek
completes
[#&#8203;1351](https://github.com/react-native-community/react-native-video/pull/1351)
- Remove unneeded onVideoSaved event
[#&#8203;1350](https://github.com/react-native-community/react-native-video/pull/1350)
- Disable AirPlay if sidecar text tracks are enabled
[#&#8203;1304](https://github.com/react-native-community/react-native-video/pull/1304)
- Add possibility to remove black screen while video is loading in
Exoplayer
[#&#8203;1355](https://github.com/react-native-community/react-native-video/pull/1355)

##### Version 4.0.1

- Add missing files to package.json
[#&#8203;1342](https://github.com/react-native-community/react-native-video/pull/1342)

##### Version 4.0.0

- Partial support for timed metadata on Android MediaPlayer
[#&#8203;707](https://github.com/react-native-community/react-native-video/pull/707)
- Support video caching for iOS
[#&#8203;955](https://github.com/react-native-community/react-native-video/pull/955)
- Video caching cleanups
[#&#8203;1172](https://github.com/react-native-community/react-native-video/pull/1172)
- Add ipod-library support
[#&#8203;926](https://github.com/react-native-community/react-native-video/pull/926/files)
- Fix crash on ExoPlayer when there are no audio tracks
[#&#8203;1233](https://github.com/react-native-community/react-native-video/pull/1233)
- Reduce package size
[#&#8203;1231](https://github.com/react-native-community/react-native-video/pull/1231)
- Remove unnecessary import in TextTrackType
[#&#8203;1229](https://github.com/react-native-community/react-native-video/pull/1229)
- Prevent flash between poster and video
[#&#8203;1167](https://github.com/react-native-community/react-native-video/pull/1167)
- Support react-native-dom
[#&#8203;1253](https://github.com/react-native-community/react-native-video/pull/1253)
- Update to ExoPlayer 2.8.2. Android SDK 26 now required
[#&#8203;1170](https://github.com/react-native-community/react-native-video/pull/1170)
- Update to ExoPlayer 2.8.4
[#&#8203;1266](https://github.com/react-native-community/react-native-video/pull/1266)
- Add fullscreenOrientation option for iOS
[#&#8203;1215](https://github.com/react-native-community/react-native-video/pull/1215)
- Update to ExoPlayer 2.9.0
[#&#8203;1285](https://github.com/react-native-community/react-native-video/pull/1285)
- Switch useTextureView to default to `true`
[#&#8203;1286](https://github.com/react-native-community/react-native-video/pull/1286)
- Re-add fullscreenAutorotate prop
[#&#8203;1303](https://github.com/react-native-community/react-native-video/pull/1303)
- Make seek throw a useful error for NaN values
[#&#8203;1283](https://github.com/react-native-community/react-native-video/pull/1283)
- Video Filters and Save Video
[#&#8203;1306](https://github.com/react-native-community/react-native-video/pull/1306)
- Fix: volume should not change on onAudioFocusChange event
[#&#8203;1327](https://github.com/react-native-community/react-native-video/pull/1327)
- Update ExoPlayer to 2.9.1 and OkHTTP to 3.12.0
[#&#8203;1338](https://github.com/react-native-community/react-native-video/pull/1338)

##### Version 3.2.0

- Basic fullscreen support for Android MediaPlayer
[#&#8203;1138](https://github.com/react-native-community/react-native-video/pull/1138)
- Simplify default Android SDK code
[#&#8203;1145](https://github.com/react-native-community/react-native-video/pull/1145)
[#&#8203;1146](https://github.com/react-native-community/react-native-video/pull/1146)
- Various iOS sideloaded text track fixes
[#&#8203;1157](https://github.com/react-native-community/react-native-video/pull/1157)
- Fix
[#&#8203;1150](https://github.com/react-native-community/react-native-video/issues/1150)
where assets with bundled assets don't work on iOS in release mode
[#&#8203;1162](https://github.com/react-native-community/react-native-video/pull/1162)
- Support configuring the buffer on Android ExoPlayer
[#&#8203;1160](https://github.com/react-native-community/react-native-video/pull/1160)
- Prevent sleep from sleeping while videos are playing on Android
MediaPlayer
[#&#8203;1117](https://github.com/react-native-community/react-native-video/pull/1117)
- Update NewtonSoft JSON to match react-native-windows version
[#&#8203;1169](https://github.com/react-native-community/react-native-video/pull/1169)

##### Version 3.1.0

- Support sidecar text tracks on iOS
[#&#8203;1109](https://github.com/react-native-community/react-native-video/pull/1109)
- Support onAudioBecomingNoisy on iOS
[#&#8203;1131](https://github.com/react-native-community/react-native-video/pull/1131)

##### Version 3.0

- Inherit Android buildtools and SDK version from the root project
[#&#8203;1081](https://github.com/react-native-community/react-native-video/pull/1081)
- Automatically play on ExoPlayer when the paused prop is not set
[#&#8203;1083](https://github.com/react-native-community/react-native-video/pull/1083)
- Preserve Android MediaPlayer paused prop when backgrounding
[#&#8203;1082](https://github.com/react-native-community/react-native-video/pull/1082)
- Support specifying headers on ExoPlayer as part of the source
[#&#8203;805](https://github.com/react-native-community/react-native-video/pull/805)
- Prevent iOS onLoad event during seeking
[#&#8203;1088](https://github.com/react-native-community/react-native-video/pull/1088)
- ExoPlayer playableDuration incorrect
[#&#8203;1089](https://github.com/react-native-community/react-native-video/pull/1089)

##### Version 2.3.1

- Revert PR to inherit Android SDK versions from root project. Re-add in
3.0
[#&#8203;1080](https://github.com/react-native-community/react-native-video/pull/1080)

##### Version 2.3.0

- Support allowsExternalPlayback on iOS
[#&#8203;1057](https://github.com/react-native-community/react-native-video/pull/1057)
- Inherit Android buildtools and SDK version from the root project
[#&#8203;999](https://github.com/react-native-community/react-native-video/pull/999)
- Fix bug that caused ExoPlayer to start paused if playInBackground was
set
[#&#8203;833](https://github.com/react-native-community/react-native-video/pull/833)
- Fix crash if clearing an observer on iOS that was already cleared
[#&#8203;1075](https://github.com/react-native-community/react-native-video/pull/1075)
- Add audioOnly prop for music files
[#&#8203;1039](https://github.com/react-native-community/react-native-video/pull/1039)
- Support seeking with more exact tolerance on iOS
[#&#8203;1076](https://github.com/react-native-community/react-native-video/pull/1076)

##### Version 2.2.0

- Text track selection support for iOS & ExoPlayer
[#&#8203;1049](https://github.com/react-native-community/react-native-video/pull/1049)
- Support outputting to a TextureView on Android ExoPlayer
[#&#8203;1058](https://github.com/react-native-community/react-native-video/pull/1058)
- Support changing the left/right balance on Android MediaPlayer
[#&#8203;1051](https://github.com/react-native-community/react-native-video/pull/1051)
- Prevent multiple onEnd notifications on iOS
[#&#8203;832](https://github.com/react-native-community/react-native-video/pull/832)
- Fix doing a partial swipe on iOS causing a black screen
[#&#8203;1048](https://github.com/react-native-community/react-native-video/pull/1048)
- Fix crash when switching to a new source on iOS
[#&#8203;974](https://github.com/react-native-community/react-native-video/pull/974)
- Add cookie support for ExoPlayer
[#&#8203;922](https://github.com/react-native-community/react-native-video/pull/922)
- Remove ExoPlayer onMetadata that wasn't being used
[#&#8203;1040](https://github.com/react-native-community/react-native-video/pull/1040)
- Fix bug where setting the progress interval on iOS didn't work
[#&#8203;800](https://github.com/react-native-community/react-native-video/pull/800)
- Support setting the poster resize mode
[#&#8203;595](https://github.com/react-native-community/react-native-video/pull/595)

###
[`v6.0.0-alpha.9`](https://github.com/react-native-community/react-native-video/blob/HEAD/CHANGELOG.md#Version-600-alpha9)

[Compare
Source](https://github.com/react-native-community/react-native-video/compare/v6.0.0-alpha.8...v6.0.0-alpha.9)

- All: add built-in typescript support
[#&#8203;3266](https://github.com/react-native-video/react-native-video/pull/3266)
- All: update documentation generation
[#&#8203;3296](https://github.com/react-native-video/react-native-video/pull/3296)
- **BREAKING CHANGE**❗️Android: update isCodecSupported to return enum
[#&#8203;3254](https://github.com/react-native-video/react-native-video/pull/3254)
- Android: use explicit not-exported flag for AudioBecomingNoisyReceiver
[#&#8203;3327](https://github.com/react-native-video/react-native-video/pull/3327)
- Android: remove kotlin-android-extensions
[#&#8203;3299](https://github.com/react-native-video/react-native-video/pull/3299)
- Android: ensure audio volume is changed in UI thread
[3292](https://github.com/react-native-video/react-native-video/pull/3292)
-   Android: multiple internal refactor and switch to kotlin
- Android: refactor log management and add an option to increase log
verbosity
[#&#8203;3277](https://github.com/react-native-video/react-native-video/pull/3277)
-   iOS: Fix audio session category when not using the audioOutput prop
- iOS: implement onPlaybackStateChanged callback
[#&#8203;3307](https://github.com/react-native-video/react-native-video/pull/3307)
- iOS: remove false calls at onPlaybackRateChange
[#&#8203;3306](https://github.com/react-native-video/react-native-video/pull/3306)
- iOS: audio does not work with headphones
[#&#8203;3284](https://github.com/react-native-video/react-native-video/pull/3284)
- iOS: Resuming video ad after closing the in-app browser on iOS
[#&#8203;3275](https://github.com/react-native-video/react-native-video/pull/3275)
- iOS, Android: expose playback functions to ref
[#&#8203;3245](https://github.com/react-native-video/react-native-video/pull/3245)
- tvOS: fix build:
[#&#8203;3276](https://github.com/react-native-video/react-native-video/pull/3276)
- Windows: fix build error from over-specified SDK version
[#&#8203;3246](https://github.com/react-native-video/react-native-video/pull/3246)
- Windows: fix `onError` not being raised
[#&#8203;3247](https://github.com/react-native-video/react-native-video/pull/3247)

###
[`v6.0.0-alpha.8`](https://github.com/react-native-community/react-native-video/blob/HEAD/CHANGELOG.md#Version-600-alpha8)

[Compare
Source](https://github.com/react-native-community/react-native-video/compare/v6.0.0-alpha.7...v6.0.0-alpha.8)

- All: Playing audio over earpiece
[#&#8203;2887](https://github.com/react-native-video/react-native-video/issues/2887)
- All: Prepare for fabric
[#&#8203;3175](https://github.com/react-native-video/react-native-video/pull/3175)
[#]()
- iOS: Fix Pip
[#&#8203;3221](https://github.com/react-native-video/react-native-video/pull/3221)
- iOS: Fix regression in presentFullscreenPlayer &
dismissFullscreenPlayer
[#&#8203;3230](https://github.com/react-native-video/react-native-video/pull/3230)
- tvOS: Fix build
[#&#8203;3207](https://github.com/react-native-video/react-native-video/pull/3207)
- tvOS: Add sample
[#&#8203;3208](https://github.com/react-native-video/react-native-video/pull/3208)
- tvOS: Allow chapter customization
[#&#8203;3216](https://github.com/react-native-video/react-native-video/pull/3216)
- doc: Fix internal links
[#&#8203;3229](https://github.com/react-native-video/react-native-video/pull/3229)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 5pm,every weekend" in timezone
America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone
America/Los_Angeles.

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/valora-inc/wallet).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Satish Ravi <satish.ravi@valoraapp.com>
Co-authored-by: valora-bot <valorabot@valoraapp.com>
MeenuDhanoa added a commit to railroadmedia/react-native-video that referenced this pull request Aug 13, 2024
* Fix so background audio from other apps can play when disableFocus is true. requestAudioFocus was being run regardless of there being a src, so I made it so that only gets requested when a src exists.

* Added details to readme and changelog

* update for androidX

* change minSdkVersion back to 16

* update readme

* remove duplicate ReactVideoPackage()

* add readme to migrating to AndroidX

* add read me

* fix read me

* pre androidX, upgrade to 28

* remove duplicated line in example

* change dead code in  example

* Remove calls to [super observe] to fix crash

* Add TheWidlarzGroup#1646 to changelog

* bring back super KVO with selector check

* Fix memory leak when using AVPlayerViewController, make sure to release player

* Updated changelog

* changelog for TheWidlarzGroup#1629

* bump version

* chang maven to google

* fix when controls & muted

* update changelog

* handle racing conditions when props are setted on exoplayer

* fix for setControls

* fix repeat

* comment why postDelayed

* remove extra whitespace

* remove rnpm

* 4.4.4

* Update README.md

Make installation parts easier to link

* Update README.md

fix typo

* Update README.md

Make more obvious the changes needed via using diff

* Update MainApplication.java

fix indent

* remove matchingfallbacks in example

* prepare 5.0.0 version

* cpck androidx

* change minSdkVersion back to 16

(cherry picked from commit a96fa33)

* update readme

(cherry picked from commit 3ddcba3)

* add readme to migrating to AndroidX

(cherry picked from commit 976ebcc)

* cpck readme

* fix read me

(cherry picked from commit ed25b3f)

* chang maven to google

(cherry picked from commit 8a8f215)

* cpck

* ad platform installation to TOC

(cherry picked from commit b0737bd)

* More update info

(cherry picked from commit 2f23cc0)

* 5.0.1

* Fixed Exoplayer doesn't work with mute=true TheWidlarzGroup#1696

* Updated README.md to include instructions for React Native 0.60 and above

* Removing the call to observeValueForKeyPath:ofObject:change:context: on super from RCTVideo.
If the super class is not actually observing the key, the app will crash. Checking to see if
the super class responds to this selector doesn't solve this issue.

react-native-video github issue: TheWidlarzGroup#1515

Discussion about this particular problem: https://stackoverflow.com/questions/6574714/whats-wrong-with-this-observevalueforkeypathofobjectchangecontext-implement

* Updated CHANGELOG to reflect bug fix in PR 1720

* added support for automaticallyWaitsToMinimizeStalling property on iOS

* update readme

* fix invert boolean property

* bumped version & updated changelog

* fix formatting issues

* fix formatting
fix crash iOS9

* changelog for TheWidlarzGroup#1696

* Update issue templates

* Update bug_report.md

* Update bug_report.md

* Fix indent and respect previous rate

* Bring the basic example back to a runnable state

* Remove Exoplayer deprecations

- Bump Exoplayer to 2.10.4
- Remove deprecated usages of Exoplayer methdos
- Add `ReactExoplayerConfig` as extension points to configure the Exoplayer instance

* Update changelog with Exoplayer update (TheWidlarzGroup#1766)

* update package json version

* update changelog version

* Add disableFocus to TOC

* fix typo in README

* Clear progress messages on STATE_IDLE and STATE_BUFFERING (TheWidlarzGroup#1768)

The progress message handler will duplicate recursions of the `onProgressMessage` handler on change of player state from any state to STATE_READY with `playWhenReady` is true (when video is not paused). This clears the messages on STATE_IDLE and STATE_BUFFERING to break the recursion.

* fix README about reportBandwidth (TheWidlarzGroup#1816)

* Fixes a situation when exiting fullscreen, where observed keypath values have not been released

* add try catch block around removal of observer keypaths on playerViewController

* Audio Poster issue fix (TheWidlarzGroup#1779)

* Add full screen support to Android Exoplayer (TheWidlarzGroup#1730)

* Bump version to 5.1.0-alpha

* Fix readme grammar (TheWidlarzGroup#1888)

* Improve Android Audio Focus (TheWidlarzGroup#1897)

Implement audio focus as per android docs:
https://developer.android.com/guide/topics/media-apps/audio-focus
https://medium.com/androiddevelopers/audio-focus-3-cdc09da9c122

AUDIOFOCUS_LOSS should abandon focus and not try resuming audio, this is done with AUDIOFOCUS_LOSS_TRANSIENT

This fixes at least:
- Audio not being paused after focus being taken by some voip applications
- Content resuming and pausing instantly sporadically (some race condition perhaps) when activity was resumed from background.

* Update changelog (TheWidlarzGroup#1913)

* docs(video): fix bufferConfig property name (TheWidlarzGroup#1855)

* Fix play/pause regression after added fullscreen support. (TheWidlarzGroup#1916)

* v5.1.0-alpha4

* Bump javascript dependencies (TheWidlarzGroup#1914)

Also update linting rules to match other community repositories.

* Add support for react-native Windows Cpp/WinRT (TheWidlarzGroup#1893)

This also deprecates the old react-native windows implementation

* Fix the `ref` sample code to remove the syntax error

* Update changelog

* v5.1.0-alpha5

* Don't set reactViewController view frame to whole screen (TheWidlarzGroup#1931)

this fixes the case on any time you have a react view that displays the video, but it's being rendered with controls but not as a full screen (ie. easily reproducible when you have a tabbar for instance - the reactViewController.view frame shouldnt be the whole screen bounds).

* Update onLoad event to include videoTracks info

* add mixWithOthers prop

* Update README.md

* Update index.ios.js

* Fix video dimensions for HLS streams

* Changelog

* Compare CGFloats instead

* Update CHANGELOG.md

* Update CHANGELOG, alpha-6 hasn't been released yet

* Implement pending seek

* Recommend npx pod-install for setup instructions

# Summary

We've been recommending devs use `npx pod-install` since it will attempt to install CocoaPods CLI if it's not available on the computer (cite [React Navigation setup guide](https://reactnavigation.org/docs/getting-started/#installing-dependencies-into-a-bare-react-native-project)). This has proved very useful for Expo users who are now migrating to the bare workflow and want to use community packages in their projects.

## Checklist

- [x] I have tested this on a device and a simulator
- [x] I added the documentation in `README.md`

* Expose currentPlaybackTime when live stream video (TheWidlarzGroup#1944)

* added trackId to exoplayer onLoad callback

* added trackInfo to bandwidth callback

* syntax fix

* syntax fix

* version update

* sending complete logcat for media playback exception ExoPlaybackException

* version bump

* package publish changes

* Live playback fix

* Version bump

* import fix

* version bump

* configurable preferredForwardBufferDuration

* configurable preferredForwardBufferDuration

* version update

* Exposing time

* exo player window current tsp

* return type

* Current window timestamp in epoch

* iOS changes

* version update

* Updated package.json

* updated version

* CurrentTime bug fix

* Updated package.json

* Updated currentPlaybackTime

* Updated currentPlayback logic

* Updated package.json

* Bug fix

* Added semicolon

* updated package.json

* Updated ReactVideoView

* updated verison

* Revert package.json changes

* Update ReactVideoView.java

* Use standard log

* Document preferredForwardBufferDuration (iOS)

* Document currentPlaybackTime

* Document trackId

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update README.md

* Update CHANGELOG.md

Co-authored-by: anubansal <anu.bansal@curefit.com>
Co-authored-by: Sivakumar J <sivakumar@curefit.com>
Co-authored-by: parikshit <parikshit@curefit.com>
Co-authored-by: anubansal92 <40559524+anubansal92@users.noreply.github.com>
Co-authored-by: Rishu Agrawal <rishu.agrawal@v.curefit.com>
Co-authored-by: rishu-curefit <54575330+rishu-curefit@users.noreply.github.com>

* [ios] Adaptive fullscreen in landscape by device orientation (TheWidlarzGroup#1862)

* update UIInterfaceOrientation in fullscreen

* update code

* Revert "[ios] Adaptive fullscreen in landscape by device orientation (TheWidlarzGroup#1862)" (TheWidlarzGroup#2043)

This reverts commit c9096d1.

* Upgrade exoplayer to 2.11.4 (TheWidlarzGroup#2034)

* Removed JS fullscreening for Android (TheWidlarzGroup#2013)

* Always set headers for iOS (TheWidlarzGroup#2014)

* Support preventsDisplaySleepDuringVideoPlayback (TheWidlarzGroup#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>

* Fix exoplayer aspect ratio update on source changes (TheWidlarzGroup#2053)

* Fix exoplayer aspect ratio update on source changes

* Update CHANGELOG.md

* Add iOS and Android basic DRM support (TheWidlarzGroup#1445)

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)

* Ready 5.1.0-alpha6 for release

* Prepare 5.1.0-alpha7

* Port over fix from 4.x branch

* Prepare 5.1.0-alpha8

* Bugfix: TheWidlarzGroup#1930

* Add ARM64 support for windows (TheWidlarzGroup#2137)

Adding arm64 support for RNW builds.

Nothing in this project is using anything that isn't already supported in arm64 windows libs. It was simply overlooked when RNW was originally added.

We have been using RNW and RNV in our project for 6+ months and just been using a patch-package to apply this change. Figured it was overdue to upstream this change.

You can see this similar code in the RNW repo.
https://github.com/microsoft/react-native-windows/blob/95935e008621778dbcec01363602c19abc060632/packages/microsoft-reactnative-sampleapps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj#L28
and
https://github.com/microsoft/react-native-windows/blob/master/packages/microsoft-reactnative-sampleapps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj#L44

* Update README.md (TheWidlarzGroup#2076)

You only need to perform linking for React Native < 0.60

* fix: Xcode 12 compatibility (TheWidlarzGroup#2152)

Latest Xcode 12 fails to build while without a module to depend on React-Core directly hence this change is necessary for native modules on iOS. This change requires to React Native 0.60.2 or newer. For more details please check: facebook/react-native#29633 (comment)

* Renaming Boolean etc to AsBoolean (TheWidlarzGroup#2119)

* Resolved an issue where setting a video to paused would ignore the “silent switch” setting

* iOS DRM Fixes for License Fetching (TheWidlarzGroup#2208)

* Update package.json version number to 5.1.1

* Update ReactNativeVideoCPP.vcxproj (TheWidlarzGroup#2288)

* Exoplayer: Use okhttp version specified in gradle.properties (TheWidlarzGroup#2340)

Because React Native uses okhttp, including exoplayer causes apps to use two different versions of okhttp.  This results in some unpredictable behavior.  Clients of `react-native-video` should be able to specify the same OKHTTP version to react-native and react-native video.

See where it's specified in react-native trunk: 
- https://github.com/facebook/react-native/blob/master/ReactAndroid/gradle.properties#L15
- https://github.com/facebook/react-native/blob/e1b6cd3f756aa034b11af6bf9960efb42bde8692/ReactAndroid/build.gradle#L452-L453

* React Native Windows updates (TheWidlarzGroup#2206)

Various updates for React Native Windows

**Docs**
* Fixed windows installation in readme
* Added local dev setup instructions

**Build**
* Added VS solutions for RNW 0.61, 0.62, and 0.63+
* Added clang-formatting definition

**Features**
* Fixed autolinking for RNW 0.63+
* Added support for `rate` property

**Examples**
* Upgraded examples/basic to RN 0.61 and replaced broken windows app

* Update README.md (TheWidlarzGroup#2292)

Fix broken link for ignoresilentswitch

* Fix AudoFocus pausing video when attempting to play (TheWidlarzGroup#2311)

Fix AudioFocus bug that could cause the player to stop responding to play/pause in some instances.

Fixes issue TheWidlarzGroup#1945

This was caused by the player requesting audio focus on each play (un-pause) and that resulted in a small window of Audio focus loss and then gain. The focus loss results in the player being paused while the player was supposed to play at the time. The solution is to keep track of Audio focus and not request new focus if we already have it.

* Upgrade ExoPlayer to 2.13.2 (TheWidlarzGroup#2317)

Upgrade ExoPlayer from 2.11.4 to 2.13.2 and fix any issues related to the upgrade and deprecated method use.

* update exoplayer to allow pre-init and content clear

* Fix for tvOS native audio menu language selector

* Release 5.2.0-alpha1

* Typo

* Release 5.2.0

* Use prop types from `deprecated-react-native-prop-types`

Starting with React Native 0.68, using Prop Types from `react-native` emits a warning.

* Update Video.js

Co-authored-by: Elliott Kember <elliott.kember@gmail.com>
# Conflicts:
#	Video.js

* Replace Image.propTypes with ImagePropTypes.
# Conflicts:
#	Video.js

* fix(Exoplayer): fix exoplayer version tà 2.13.3

* chore: fix build without exoplayer

* v5.2.1

* docs: update Android installation

* * removed duplicate method

* * fix onRemotePlayPause in android

* * remove duplicate code

* * fix cannot find symbol after RN update

---------

Co-authored-by: Kurt Johnson <kurt.johnson@lightmaker.com>
Co-authored-by: Kurt Johnson <kurtjohnson8@gmail.com>
Co-authored-by: vok <admin@MacOnes-MacBook-Pro-2.local>
Co-authored-by: Zaid Daghestani <zaid.daghestani@gmail.com>
Co-authored-by: Jens Andersson <jens@fritan.com>
Co-authored-by: Daniel Mariño Ruiz <1237997+CHaNGeTe@users.noreply.github.com>
Co-authored-by: Daniel Mariño <daniel.marino@24imedia.com>
Co-authored-by: Ash Mishra <a.mishra@nfb.ca>
Co-authored-by: Andrew Chae <asjchae@gmail.com>
Co-authored-by: Jamie Halvorson <jamie@halvorson.co.uk>
Co-authored-by: Nahuel Marisi <nahuel.marisi@klarna.com>
Co-authored-by: Jovan Stanimirovic <jovan@netlog.com>
Co-authored-by: Benoit Dion <unknown>
Co-authored-by: Benoit Dion <573574+benoitdion@users.noreply.github.com>
Co-authored-by: Bader Serhan <baderserhan@gmail.com>
Co-authored-by: Tsukasa Setoguchi <tsukasa.setoguchi@gmail.com>
Co-authored-by: Learnyst <shankar@karaokegarage.com>
Co-authored-by: IbrahimSulai <33604125+IbrahimSulai@users.noreply.github.com>
Co-authored-by: Benoit Dion <benoit@eliteness.app>
Co-authored-by: Mohammed Salman <msal4@outlook.com>
Co-authored-by: Michael Tintiuc <michaeltintiuc@users.noreply.github.com>
Co-authored-by: Piotr Błażejewicz (Peter Blazejewicz) <peterblazejewicz@users.noreply.github.com>
Co-authored-by: Benoit Dion <benoitdion@gmail.com>
Co-authored-by: Di Da <dida@microsoft.com>
Co-authored-by: Brandon Faulkner <college.bfaulk96@yahoo.com>
Co-authored-by: Marlon Andrade <marlonmandrade@gmail.com>
Co-authored-by: Hampton Maxwell <me@hamptonmaxwell.com>
Co-authored-by: Harrison Mendonça <harrisonmendonca@gmail.com>
Co-authored-by: Evan Bacon <baconbrix@gmail.com>
Co-authored-by: Param Aggarwal <paramaggarwal@gmail.com>
Co-authored-by: anubansal <anu.bansal@curefit.com>
Co-authored-by: Sivakumar J <sivakumar@curefit.com>
Co-authored-by: parikshit <parikshit@curefit.com>
Co-authored-by: anubansal92 <40559524+anubansal92@users.noreply.github.com>
Co-authored-by: Rishu Agrawal <rishu.agrawal@v.curefit.com>
Co-authored-by: rishu-curefit <54575330+rishu-curefit@users.noreply.github.com>
Co-authored-by: Tuan Luong <tuanluong.it@gmail.com>
Co-authored-by: limaAniceto <lima.aniceto@gmail.com>
Co-authored-by: Anders Lemke <mail@anderslemke.dk>
Co-authored-by: Anton Tanderup <antontandrup@gmail.com>
Co-authored-by: Jeferson Daniel <contato@jefersondaniel.com>
Co-authored-by: Daniel Mariño <35027703+danielmarino24i@users.noreply.github.com>
Co-authored-by: Hampton Maxwell <hmaxwell@ellation.com>
Co-authored-by: Nick Fujita <nickfujita@gmail.com>
Co-authored-by: redspear <willkoia@gmail.com>
Co-authored-by: Adam Gorman <namrog84@users.noreply.github.com>
Co-authored-by: Irwin <irwinwilliams@users.noreply.github.com>
Co-authored-by: Radek Czemerys <7029942+radko93@users.noreply.github.com>
Co-authored-by: Tero Paananen <54746036+tero-paananen@users.noreply.github.com>
Co-authored-by: Cameron Perry <cameron.perry@valtech.com>
Co-authored-by: Alexander Sklar <asklar@microsoft.com>
Co-authored-by: Sean Holbert <sdholbs@gmail.com>
Co-authored-by: Jon Thysell <thysell@gmail.com>
Co-authored-by: Milan Susnjar <milanrs@gmail.com>
Co-authored-by: Armands Malejev <armands.malejevs@gmail.com>
Co-authored-by: Jonas Dalesjö <jonas.dalesjo@gmail.com>
Co-authored-by: Shane Mckenna <shanemckennadev@gmail.com>
Co-authored-by: Renaud Chaput <renchap@gmail.com>
Co-authored-by: olivier bouillet <olivier.bouillet@ifeelsmart.com>
Co-authored-by: Omar Diop <accounts@omardiop.com>
Co-authored-by: Olivier Bouillet <62574056+freeboub@users.noreply.github.com>
Co-authored-by: ARTSOFT\csillaj <jenei_csilla@yahoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants