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

[expo-av] Fix stability issue due to player-item observers not cleaned up #9350

Merged
merged 3 commits into from
Jul 23, 2020

Conversation

IjzerenHein
Copy link
Contributor

@IjzerenHein IjzerenHein commented Jul 22, 2020

Why

There are reports of crashes in the observer handling code of AVPlayerData, see #7764. This PR fixes a problem with AVPlayerItem observers not being removed after the AVQueuePlayer switched to another item.
Together with #9334, this might provide a fix for #7764 but that needs to be verified first.

How

  • Remove existing AVPlayerItem observers when AVQueuePlayer switches to new currentItem
  • Add Replay option to NCL in order to verify existing replay behavior

Test Plan

  • Tested using Audio & Video examples in NCL and and everything seemed to work as expected
  • Verified that repeat/looping works as expected
  • Verified that the observers are removed when switching items and on dealloc

image

@github-actions
Copy link
Contributor

Native Component List for this branch is ready

Copy link
Contributor

@bbarthec bbarthec left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Solid work on av module 💯 💪

@IjzerenHein IjzerenHein merged commit 2f9ea69 into master Jul 23, 2020
@IjzerenHein IjzerenHein deleted the @hein/expo-av/fix-observer-registrations branch July 23, 2020 12:00
Jamedjo pushed a commit to Jamedjo/expo that referenced this pull request Feb 4, 2021
…d up (expo#9350)

* [expo-av] Cleanup player-item observers

* [nlc] Add expo-av replay option

* [expo-av] Update changelog
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.

2 participants