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

Cannot restore radio #124

Open
andrey-lisovskiy opened this issue Jul 14, 2019 · 5 comments
Open

Cannot restore radio #124

andrey-lisovskiy opened this issue Jul 14, 2019 · 5 comments

Comments

@andrey-lisovskiy
Copy link

andrey-lisovskiy commented Jul 14, 2019

  1. Go to app
  2. Start to Play any radio, then press Stop.
  3. Swipe from top and enable Flight Mode
  4. Return to app and press Play, then Stop.
  5. Swipe from top and disable Flight Mode
  6. Return to app and press Play/Stop - nothing happens.
@geraldnolan
Copy link
Contributor

I've seen similar issues when playing with bluetooth. I think it's after a long period of time.

For example, during a morning commute, the app works as expected, the station paused after the car is shut off. After work, the station will not play unless you change to a new station and then change back to the original.

@geraldnolan
Copy link
Contributor

@joemcmahon
Copy link

@geraldnolan's suggestion works. I have, in my fork of the app, added a timer that switches the app to STOPPED after 50-some seconds. This allows it to resume playing (but of course loses the buffered music).

@geraldnolan
Copy link
Contributor

@joemcmahon can you share which branch you made that change? I'd like to see how you implement it?

@joemcmahon
Copy link

joemcmahon@d03b54f#diff-8783724a818055cb6d918cbb15c551b1 has the necessary commits in FRadioPlayer.swift. It sets up a timer in the pause function that goes off and sets a flag that says "we've overbuffered, start a new player when play is pressed again". We also detect playerItemFailedToPlayToEndTime and put the player into the stopped state if this happens. This seems to catch all of the "paused and can't resume" errors.

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

No branches or pull requests

3 participants