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

Improving Chromecast Integration #1298

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

dumpfheimer
Copy link
Contributor

Changes
This PR is targeting Chrome Cast support in the Jellyfin Android app. Chromecast seems to have multiple issues in my environment and I am aiming to make it a smoother experience.

I am by far NOT an expert in Android development but I was involved in Android development, so I am not absolutely incompetent to make improvements. However my PRs should be taken with a grain of salt and I will probably need a fair amount of help.

Changed RemotePlayerService wake lock and foreground binding to ensure it does not get killed by OS
TODOs:

  • Ensure RemotePlayerService acquires foreground lock (locked to notification)
  • Do not immediately release wake lock in RemotePlayerService and do not remove notification in onStopped immediately, but wait 15s if another track starts
  • Request wake lock for longer than current playing title
  • Check why no notification is created initially when starting app and connecting to cast target (restarting app then recreates session and creates the notification, starting the service)
  • Fix volume control
  • Find out what causes "mediaItem" not found in JSONObject which kills the app

Issues

Christopher Hoch added 11 commits February 14, 2024 09:36
wait for 15 seconds before actually shutting down.
this is because chromecast playback somethimes seems to play a track and when that one stops, plays another.
That means, that stop is called in the mean time which causes the notification to disappear and the wake lock to be released which can cause errors an restarting the background service. to prevent this we wait 15 seconds before actually stopping the service, giving chromecast/jellyfin client time to start another track.
@jellyfin-bot jellyfin-bot added this to the v2.7.0 milestone Feb 15, 2024
Christopher Hoch added 2 commits February 15, 2024 15:07
@castillofrancodamian
Copy link
Contributor

castillofrancodamian commented Mar 6, 2024

Also fix the bug where swiping on the timeline does not work when casting to TV using Google Cast. Playback stops when you want to go to another time. This issue happens when sending from Jellyfin Web.

@Maxr1998
Copy link
Member

Thanks for looking into this! So far, the changes look pretty good. Please tell me when you have specific questions about fixing the remaining TODOs.

@Maxr1998
Copy link
Member

Maxr1998 commented Apr 7, 2024

What's the state of this? Would you prefer to continue working on it first, or do you think we can already merge the existing changes?

@jellyfin-bot jellyfin-bot added the merge conflict Conflicts prevent merging label Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge conflict Conflicts prevent merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants