jellyfin-chromecast icon indicating copy to clipboard operation
jellyfin-chromecast copied to clipboard

Jellyfin app stops controlling casting unless I disconnect it and I restart the app

Open Harrenkyym opened this issue 3 years ago • 6 comments

Describe the bug

When I cast a movie, from a certain minute the Jellyfin app lose the connection to Chromecast. I don't see any progress bar and when I select "use as remote control" I see as if nothing was casting. I have to disconnect from casting, close the app, restart it, connect to chromecast, see it it's working, if not, redo the same steps until I can reconnect and take the control again.

To Reproduce

  1. Cast a movie
  2. Wait until the Jellyfin app stops showing any progress and the connection to Chromecast displays a void screen.
  3. See error
  4. Disconnect from Chromecast
  5. Close app
  6. Open app and close again because the Chromecast device is not showing up
  7. Open app
  8. Connect to Chromecast again, see if now you regained control

Expected behavior

I expect to NEVER lose the control of the casting.

Screenshots

https://i.imgur.com/E7fcxb8.png https://i.imgur.com/W1zCvNh.png https://i.imgur.com/jQXGzpL.png

System (please complete the following information):

  • OS: Windows 10/Android 11
  • Browser: any
  • Jellyfin Version: last one
  • Cast client: The one with Google TV and remote.

Harrenkyym avatar Jan 23 '22 01:01 Harrenkyym

Just a quick note - I saw you mention your device:

Cast client: The one with Google TV and remote.

Since this device uses Android TV, you can install our app directly on it so you don't have to Cast to it. Just get "Jellyfin for Android TV" from the Play Store.

We'll see about the other issue, but this may better for you to use because of the client you have.

anthonylavado avatar Oct 10 '22 12:10 anthonylavado

Well, in a room I have this device, but in another one I have another without remote and the problem is the same. :/

Harrenkyym avatar Oct 10 '22 13:10 Harrenkyym

I didn't want to open a new issue, but I am experiencing this as well I believe. I have multiple Chromecast Ultras (all with the wired ethernet adapter) and casting works well in general. I am on android currently with Jellyfin App 2.5.2 on a OnePlus 7T Pro on Android 12, but I'm seeing the same behavior on multiple android versions on various tablets and old phones and such. If I cast something, after about 20 minutes (give or take) the video keeps playing, but I have no more control of it from the app or the notification on Android. I can't pause or anything; I have to open the app, click the cast icon, choose "disconnect" ("remote control" doesn't change anything), then the video usually completely stops and Jellyfin exits on the chromecast. Then I can click the cast icon, select "Google Cast", select the same chromecast, play the video again, and often I have lost my progress and have to browse to the approximate time again. I am happy to provide any debugging that would be helpful.

surfrock66 avatar Jun 21 '23 22:06 surfrock66

I'm having this problem as well, exact same symptoms as @surfrock66.

I'm not sure if it's in this code or the Jellyfin mobile app code.

Ive just discovered that Android TV is a thing so I'm considering upgrading my chromecast and using the Jellyfin for Android TV app. But it'd be nice if casting worked reliably from the mobile app as well

erindru avatar Jan 22 '24 07:01 erindru

I also have this issue accross multiple android devices (Samsung Note 10+ and Moto G G5) to my chromecast ultra. Thankfully I don't have to disconnect, but I will have to restart the app and reselect my chromecast from the cast menu to get remote control working again.

ThatAstronautGuy avatar Apr 12 '24 16:04 ThatAstronautGuy

This is absolutely an issue with the implementation of casting. Whether it stems from the keepalive from the server not being respected by android, or the android app, or something specifically done incorrectly in the implementation of casting.

I'm having this issue consistently across multiple devices and app versions. To get it working again, you have to force close the Jellyfin app and wait a few seconds. If you immediately relaunch the app after force closing it, you will not be able to regain control of the cast session.

Force closing the app, waiting, and then reconnecting to ChromeCast and manually hitting play on the media which was playing when it disconnected is the only way that I've found to work around this issue.

zQueal avatar Jun 21 '24 12:06 zQueal

Still an issue on a Samsung S23 Ultra. Basically exactly how @zQueal described.

Tukajo avatar Aug 24 '24 00:08 Tukajo

One thing which may have slightly improved casting on my local network was temporarily disabling my DNS rerouting. Why DNS would affect streaming has me stumped because the DNS service doesn't reroute or proxify local connections--and keep in mind this is all anecdotal, but I did notice an improvement when disabling DNS (libredns.gr/noads) and routing normally through my ISP.

🤷🏻‍♂️

I've also removed stock android and installed LMODroid on the tablet which controls my streaming sessions. It works significantly better than stock android, and I have no real explanation as to why because as far as I can tell the WiFi driver and modem are identical between stock and LMODroid.

All of this leads me to believe it's an issue with implementation either on the android side (which isn't supported by much evidence as streaming works flawlessly elsewhere) or with the Jellyfin implementation.

zQueal avatar Aug 24 '24 04:08 zQueal

I did a little bit of digging through the code and reading of the documentation from Google. I think I might be an issue with session management on the jellyfin-android app.

It's not entirely clear to me yet, I'm debugging in my spare time (which is not much 😅). So don't expect anything soon from me.... Especially as I am new to this space.

Tukajo avatar Aug 24 '24 14:08 Tukajo