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 route change issue after interruption #179

Merged
merged 3 commits into from Sep 8, 2020

Conversation

dani-mp
Copy link
Contributor

@dani-mp dani-mp commented Aug 17, 2020

This PR fixes an issue where interruptions were also causing route changes, making the stream not resume after them because the player was explicitly paused. The code now checks that the route change was actually caused because a device was disconnected before pausing the player and it doesn't do it if it wasn't the case (e.g. in the middle of an interruption).

This seems to be a new, undocumented behavior in the underlying AVPlayer.

It also:

  • Initialises InterruptionType and InterruptionOptions from the raw value instead of just casting them.
  • Fixes the tests according to the change above, making them more robust.

It's been a month since the fix was deployed in production on my end and so far so good.

@dani-mp
Copy link
Contributor Author

dani-mp commented Sep 1, 2020

@delannoyk hey! I'd love to see if we can merge this, what do you think?

@delannoyk
Copy link
Owner

Hey Dani! Sorry I'm in the middle of moving out/in. I'll review this next week or so!

@dani-mp
Copy link
Contributor Author

dani-mp commented Sep 1, 2020

@delannoyk, sorry about that! didn't mean to be pushy, please take all the time you need and let's do it when you have time!

Copy link
Owner

@delannoyk delannoyk left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for fixing this!

@delannoyk delannoyk merged commit 8f0ff77 into delannoyk:master Sep 8, 2020
@dani-mp dani-mp deleted the fix-interruption branch September 8, 2020 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants