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

[bugfix][iOS] player is frozen after re-focusing on the app #3326

Merged
merged 2 commits into from
Nov 6, 2023

Conversation

nethergrim
Copy link
Contributor

@nethergrim nethergrim commented Oct 30, 2023

Bug steps to reproduce:

  1. Use a <Video> player for a m3u8 video
  2. Observe video to be played well
  3. Unfocus app by opening control center or notifications center
  4. Focus back to the app
  5. Observe video frozen

Describe the changes

Just added a mirror method to applicationWillResignActive so that video won't be paused after unfocus

Similar to #2786

@KrzysztofMoch
Copy link
Collaborator

Hey @nethergrim, thanks for your PR! But I wonder if it is needed because we already have the prop playWhenInactive which does the same thing (video does not stop at opening control center or notifications center)

@nethergrim
Copy link
Contributor Author

Hey @KrzysztofMoch ,
Yes this PR just fixes the state restoration for playWhenInactive. Currently it pauses the playback when Control Center is opened, and then it remains in a paused state.
With the PR it will proceed playback as usual automatically when app gets to focus.

ios/Video/RCTVideo.swift Outdated Show resolved Hide resolved
Co-authored-by: Krzysztof Moch <krzysmoch.programs@gmail.com>
Copy link
Collaborator

@KrzysztofMoch KrzysztofMoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@KrzysztofMoch KrzysztofMoch merged commit 722ae34 into TheWidlarzGroup:master Nov 6, 2023
1 check passed
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.

None yet

3 participants