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

Background player stops responding after disconnecting from car bluetooth #2397

Open
1 task
Makaque opened this issue Jun 14, 2019 · 22 comments
Open
1 task
Labels
bug Issue is related to a bug device/software specific Issues that only happen on some devices or with some specific hardware/software player Issues related to any player (main, popup and background)

Comments

@Makaque
Copy link

Makaque commented Jun 14, 2019

If I shut my vehicle off while streaming youtube over bluetooth on the background player, the media stream can no longer be played. The app doesn't crash, and I can navigate, but I cannot resume play on the background player. Tapping play does nothing. Skipping forward or back in a playlist causes it to move to the next or previous item as expected, but does not begin to play, and tapping play still does not work. Tapping along the media progress slider to attempt to force it to load causes the progress indicator to flash and move forward slightly, then return to the beginning, simultaneously a small black rectangle appears momentarily above the play button.

Sometimes if I shut my car off only briefly, then turn it back on, media will resume play, suggesting the failure happens over some time.

@gkeegan
Copy link
Contributor

gkeegan commented Jun 14, 2019

Try attempting to do this with something like Spotify or any other music streaming app and report results please. Some info about your device might also be helpful.

@Makaque
Copy link
Author

Makaque commented Jun 14, 2019

Tried with Spotify. Played playlist in car, and shut car off in the middle of the song. After 20 minutes I pressed play and playback resumed as normal.

My phone is a Xiaomi redmi note 4x (mido).

Additional details. The Newpipe app continues to function after playback stops working. I don't need to kill the whole app to get it to begin working again, I only need to close the background player, then select background play again.

@Redirion
Copy link
Member

this might be related to the first issue described in #1989.
I have noticed it too.

@Stypox Stypox added bug Issue is related to a bug device/software specific Issues that only happen on some devices or with some specific hardware/software player Issues related to any player (main, popup and background) labels Sep 29, 2019
@Fusseldieb
Copy link

Fusseldieb commented Oct 25, 2019

Yes, confirmed. Also happens on my car.

I shut it off, the player itself pauses and the controls freeze. I cannot resume playback, the controls do nothing and it only works again if I press "X" on the notification and open a new song/playlist.

Note: Not even changing the song on the same playlist do anything. It stays on 0:00 with the play triangle in the middle and that's it. Pressing it does nothing, as described above.

Other apps handle that fine


this might be related to the first issue described in #1989.

This issue you mentioned isn't related to this one.

@Skylead
Copy link

Skylead commented Feb 7, 2020

This bug isn't limited to background player, it's breaking main player too when the car is shutoff and the phone loses bluetooth connection. All playback will fail as will reselecting the same video. Can be fixed by loading a different video and then returning to the original content.

I will do more testing to confirm it in the popup player as well as check it's effect on playlists

@Skylead
Copy link

Skylead commented Feb 14, 2020

Update, pausing the video before shutting off the car doesn't help it hold onto the stream. However, disabling bluetooth from the phone before shutting off the car keeps everything working without reloading the video. Maybe a lost bluetooth connection isn't being handled properly?

@Redirion
Copy link
Member

Redirion commented Jun 2, 2020

reading the release notes of the upcoming ExoPlayer 2.11.5 I have found something interesting:
MediaSession extension: Only set the playback state to BUFFERING if playWhenReady is true

I wonder if this is the cause for the issue, the state might always be in "BUFFERING" instead of "PAUSED", so that when on resuming later the media source is not refreshed properly even though it should, leaving to an endless seek on an invalid source.

@Skylead
Copy link

Skylead commented Jun 22, 2020

ExoPlayer patched apk doesn't seem to have changed this bug behavior for me

@stiw47
Copy link

stiw47 commented Jun 26, 2020

I can confirm everything what OP said.
My phones are Mi 6 custom ROM Havoc OS Pie and Samsung S9 Duos latest stock Q firmware
Whatever player is working, video or background, it will not continue or be responsive after car turn off. Also, all other streaming apps, Spotify for example, will continue playback on car bluetooth reconnecting.

@Stypox
Copy link
Member

Stypox commented Sep 6, 2020

Is this fixed in the apk provided in #3178?

@Redirion
Copy link
Member

Initial testing shows indeed that this problem might have been resolved! @Stypox

@Stypox
Copy link
Member

Stypox commented Sep 10, 2020

Great! Let's close this now, since #3178 will be merged surely

@Stypox Stypox closed this as completed Sep 10, 2020
@opusforlife2
Copy link
Collaborator

will be merged surely

Dear god I don't even want to imagine the possibility that it won't. :|

@Makaque
Copy link
Author

Makaque commented Sep 22, 2020

I'm still experiencing this issue with the apk provided in #3178.

@Stypox Stypox reopened this Sep 22, 2020
@Redirion
Copy link
Member

For me the issue still appears to be resolved with the test apk from pr #3178

Can anyone else give feedback?

@opusforlife2
Copy link
Collaborator

@Makaque Could you try the latest debug apk? You can find it from the pinned issue.

@opusforlife2
Copy link
Collaborator

See #4355 (comment)

@Flashwalker
Copy link

Flashwalker commented Nov 16, 2020

I have the same problem. The player suddenly stops and hangs with an endless preloading cycle.
The only way to get it play is wipe whole queue (kill app) and enqueue anew.
Also sometimes helps if to open description page, tap playback and then tap Background icon, but the queue is lost. It happens each time i use background player.

@Stypox
Copy link
Member

Stypox commented Nov 17, 2020

@Flashwalker the specific issue you are having, i.e. stopping suddenly during playback, may be fixed by 0.20.3. Could you test the RC in the pinned issue?

@Flashwalker
Copy link

@Stypox It got even worse. Stream is lost more often than in the previous version. I have 2 versions installed.

@Stypox
Copy link
Member

Stypox commented Dec 24, 2020

@Flashwalker currently there is an issue when there are multiple versions installed, try to keep installed only the latest one (0.20.6)

@mzhubail
Copy link

@opusforlife2 @Stypox

I'm affected by the same issue, but I'm not familiar with native android development. How can I get around to tackling it? see logs, use debug apk?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug device/software specific Issues that only happen on some devices or with some specific hardware/software player Issues related to any player (main, popup and background)
Projects
None yet
Development

No branches or pull requests

10 participants