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

Coonecting or disconnecting a bluetooth keyboard stop playback #1486

Closed
Arial-Z opened this issue Mar 3, 2022 · 9 comments
Closed

Coonecting or disconnecting a bluetooth keyboard stop playback #1486

Arial-Z opened this issue Mar 3, 2022 · 9 comments
Labels
bug Something isn't working playback Issue related to media playback stale

Comments

@Arial-Z
Copy link

Arial-Z commented Mar 3, 2022

Describe the bug

Start playback
Connect or disconnect a bluetooth keyboard (only tested with a keyboard)
Playback stop

playback should continue when a bluetooth device get connected or disconneted as most of them have a idle disconnect / power off

Maybe related to #1061

adb.log

Logs

No response

FFmpeg logs

No response

Media info of the file

No response

Application version

0.13.0-beta.4

Device information

Nvidia Shield Pro 2019

Android version

Android 11

Jellyfin server version

10.7.7

@Arial-Z Arial-Z added bug Something isn't working playback Issue related to media playback labels Mar 3, 2022
@mueslimak3r
Copy link
Member

Does the system play a sound when you connect/disconnect the keyboard?

If so, it's likely the audio focus loss that stops playback. Currently we don't handle transient audio focus loss and allow playback to pause then resume if focus is regained quickly.

@Arial-Z
Copy link
Author

Arial-Z commented Mar 9, 2022

No sound
Playback just stop and jellyfin go back to the library and display "Aucun élément à lire" should translate to something like "No media to play"
Bluetooth disconnect around line 1000
adb bluetooth.log

@ACR-Jeff
Copy link

ACR-Jeff commented Mar 15, 2022

I have the same exact issue. I have Jellyfin v0.13.0-beta.5
I have a Rii Mini i8+ keyboard that I use with my android tv box. It connects using bluetooth,
If I choose any of the built in player options "Automatically choose, ExoPlayer and LibVLC", When playing a video with either of those three options selected in the player preferences. While playing a video then flip the off button on my bluetooth keyboard the player will close instantly and go right back to the video details screen.

I have played with this for some time now, I have tried other players "VLC media player, MX Player and etc." Every external player works fine within Jellyfin and outside of Jellyfin.
Only happens with the built in media players within Jellyfin.
logcat.txt

@mueslimak3r
Copy link
Member

mueslimak3r commented Mar 15, 2022

Assuming the issue is related to audio focus, it's likely that a fix won't come until the playback rewrite is ready. Prior to the rewrite, I fix would require a non-trivial redesign anyway to get things functional. The reason being that switching to using media sessions is the right way to properly handle the variety of playback interrupting events that may occur. Doing that with the current design of the playback code isn't practical.

@ACR-Jeff the log you provided doesn't show any log output from the jellyfin app. If you could re-record it then I'll check again. With logs we may find a fix is feasible right away.

@ACR-Jeff
Copy link

ACR-Jeff commented Mar 16, 2022

Oh sorry about that. I am used to doing it on a different device, I believe I have it figured out now. Hope this helps solve this issue. Thank you

I went through each player two different times to make sure the logs caught everything as best as possible. Hope this helps.
logcat.txt

@mueslimak3r
Copy link
Member

Oh sorry about that. I am used to doing it on a different device, I believe I have it figured out now. Hope this helps solve this issue. Thank you

I went through each player two different times to make sure the logs caught everything as best as possible. Hope this helps. logcat.txt

From those logs it does look like the issue is caused by losing audio focus.

@jellyfin-bot
Copy link
Contributor

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

@odin81
Copy link

odin81 commented Dec 17, 2022

I'm facing the same problem.
When the bluetooth keybord get's disconnected after about 30 minutes, jellyfin restarts.

@jadev-projects
Copy link

I have the same problem when my keyboard disconnects itself or when I switch it off. It's very annoying, and the alternative I've found is to download the application on my cell phone that lets me control the box like a remote control.
I hope that the community will be able to solve this problem, as the player recovers the event and returns to the film description, which shouldn't happen.
Perhaps by being more rigorous about the events used to stop a video, the problem will resolve itself.
I hope this problem will no longer be ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working playback Issue related to media playback stale
Projects
None yet
Development

No branches or pull requests

6 participants