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: improve AVPlayer currentItem transition handling #247

Merged
merged 13 commits into from
Aug 15, 2024

Conversation

andrewjl-mux
Copy link
Contributor

@andrewjl-mux andrewjl-mux commented Aug 14, 2024

  • fix: dispatch view end when AVPlayerItem changes
  • fix: skip dispatching view init when player has no player item

end the view when there is a new AVPlayerItem
@andrewjl-mux andrewjl-mux requested a review from a team as a code owner August 14, 2024 18:49
@andrewjl-mux andrewjl-mux changed the title fix: dispatch view end when AVPlayerItem changes fix: improve AVPlayer currentItem transition handling Aug 15, 2024
Copy link

@cjpillsbury cjpillsbury left a comment

Choose a reason for hiding this comment

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

Curious if there are any breaking changes as a result of this, but feels like the "right" default behavior regardless. 👍

@andrewjl-mux
Copy link
Contributor Author

Before this change we'd dispatch a viewinit event whenever AVPlayer currentItem changed. This fix also dispatches viewend before that, which is closer to how we work on Android and in mux-embed.

This un-breaks the edge case where destroyPlayer is called at the same time as when these other transitions are happening.

@andrewjl-mux andrewjl-mux merged commit e91fcab into releases/v4.1.0 Aug 15, 2024
3 checks passed
@andrewjl-mux andrewjl-mux deleted the ajlb/fix/beacon-collection-domain-reset branch August 15, 2024 17:58
@github-actions github-actions bot mentioned this pull request Aug 16, 2024
andrewjl-mux added a commit that referenced this pull request Aug 16, 2024
* fix: improve AVPlayer currentItem transition handling (#247)

* fix: dispatch view end when AVPlayerItem changes

end the view when there is a new AVPlayerItem

* fix: skip dispatching view init when player has no player item

* build: update core library dependency
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.

3 participants