jellyfin / jellyfin-web

Web Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
2.18k stars 1.16k forks source link

No queue when playing to remote device / casting #5073

Open slipperybeluga opened 6 months ago

slipperybeluga commented 6 months ago

Describe The Bug Reopening 1244 as it was inexplicably closed by the author. In the web player (and android app), streaming/casting to a remote device causes the queue to be empty and/or inaccessible. However, the queue is still visible via the Jellyfin API. As noted in the original bug report and a reddit post on the same issue, @mcarlton00 states this bug has been present since the fork and is a presumed JS issue.

Steps To Reproduce

  1. Select "Play On" / "Cast to Device" and choose a remote device to play on
  2. Play any music
  3. Music plays as expected on remote device, however on original local web-ui, clicking the bottom control bar opens ".../web/index.html#!/queue", but the queue is empty. Queue can still be seen via Jellyfin API.

Expected Behavior Clicking bottom control bar should show the queue in the same fashion as when playing locally. What is visible in the API should be visible in the UI.

Logs No errors in logs. Logs provided below anyway. I played locally, clicked queue. Then played remotely and clicked queue to see if there were any messages.

jellyfin | [19:10:28] [INF] [56] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for {MYUSERNAME}. EnableAudioPlaybackTranscoding: True jellyfin | [19:16:20] [WRN] [89] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from https://{MYDOMAIN}.com/jellyfin/Users/9646ac3017bb455d87425245a843d5c4/Items/Resume?Limit=12&Recursive=true&Fields=PrimaryImageAspectRatio%2CBasicSyncInfo&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CThumb&EnableTotalRecordCount=false&MediaTypes=Audio to 10.0.0.43 in 0:00:00.5461994 with Status Code 200 jellyfin | [19:16:21] [WRN] [61] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from https://{MYDOMAIN}.com/jellyfin/Users/9646ac3017bb455d87425245a843d5c4/Items/Resume?Limit=12&Recursive=true&Fields=PrimaryImageAspectRatio%2CBasicSyncInfo&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CThumb&EnableTotalRecordCount=false&MediaTypes=Book to 10.0.0.43 in 0:00:00.5646599 with Status Code 200 jellyfin | [19:16:21] [WRN] [38] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from https://{MYDOMAIN}.com/jellyfin/Users/9646ac3017bb455d87425245a843d5c4/Items/Resume?Limit=12&Recursive=true&Fields=PrimaryImageAspectRatio%2CBasicSyncInfo&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CThumb&EnableTotalRecordCount=false&MediaTypes=Video to 10.0.0.43 in 0:00:00.5871315 with Status Code 200 jellyfin | [19:16:21] [WRN] [25] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from https://{MYDOMAIN}.com/jellyfin/Shows/NextUp?Limit=24&Fields=PrimaryImageAspectRatio%2CDateCreated%2CBasicSyncInfo%2CPath%2CMediaSourceCount&UserId=9646ac3017bb455d87425245a843d5c4&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CBanner%2CThumb&EnableTotalRecordCount=false&DisableFirstEpisode=false&NextUpDateCutoff=2023-01-04T00%3A16%3A20.452Z&EnableRewatching=false to 10.0.0.43 in 0:00:00.7746591 with Status Code 200 jellyfin | [19:16:32] [INF] [38] Jellyfin.Api.Controllers.UniversalAudioController: GetPostedPlaybackInfo profile: {"Name": null, "Id": null, "Identification": null, "FriendlyName": null, "Manufacturer": null, "ManufacturerUrl": null, "ModelName": null, "ModelDescription": null, "ModelNumber": null, "ModelUrl": null, "SerialNumber": null, "EnableAlbumArtInDidl": false, "EnableSingleAlbumArtLimit": false, "EnableSingleSubtitleLimit": false, "SupportedMediaTypes": "Audio,Photo,Video", "UserId": null, "AlbumArtPn": null, "MaxAlbumArtWidth": null, "MaxAlbumArtHeight": null, "MaxIconWidth": null, "MaxIconHeight": null, "MaxStreamingBitrate": 8000000, "MaxStaticBitrate": 8000000, "MusicStreamingTranscodingBitrate": 128000, "MaxStaticMusicBitrate": 8000000, "SonyAggregationFlags": null, "ProtocolInfo": null, "TimelineOffsetSeconds": 0, "RequiresPlainVideoItems": false, "RequiresPlainFolders": false, "EnableMSMediaReceiverRegistrar": false, "IgnoreTranscodeByteRangeRequests": false, "XmlRootAttributes": [], "DirectPlayProfiles": [{"Container": "opus", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "webm", "AudioCodec": "opus", "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "mp3", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "aac", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "m4a", "AudioCodec": "aac", "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "m4b", "AudioCodec": "aac", "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "flac", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "webma", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "webm", "AudioCodec": "webma", "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "wav", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "ogg", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}], "TranscodingProfiles": [{"Container": "ts", "Type": "Audio", "VideoCodec": "", "AudioCodec": "aac", "Protocol": "hls", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Streaming", "EnableSubtitlesInManifest": false, "MaxAudioChannels": null, "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}], "ContainerProfiles": [], "CodecProfiles": [], "ResponseProfiles": [], "SubtitleProfiles": [], "$type": "DeviceProfile"} jellyfin | [19:16:32] [INF] [38] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for {MYUSERNAME}. EnableAudioPlaybackTranscoding: True jellyfin | [19:16:32] [INF] [40] Jellyfin.Api.Controllers.UniversalAudioController: GetPostedPlaybackInfo profile: {"Name": null, "Id": null, "Identification": null, "FriendlyName": null, "Manufacturer": null, "ManufacturerUrl": null, "ModelName": null, "ModelDescription": null, "ModelNumber": null, "ModelUrl": null, "SerialNumber": null, "EnableAlbumArtInDidl": false, "EnableSingleAlbumArtLimit": false, "EnableSingleSubtitleLimit": false, "SupportedMediaTypes": "Audio,Photo,Video", "UserId": null, "AlbumArtPn": null, "MaxAlbumArtWidth": null, "MaxAlbumArtHeight": null, "MaxIconWidth": null, "MaxIconHeight": null, "MaxStreamingBitrate": 8000000, "MaxStaticBitrate": 8000000, "MusicStreamingTranscodingBitrate": 128000, "MaxStaticMusicBitrate": 8000000, "SonyAggregationFlags": null, "ProtocolInfo": null, "TimelineOffsetSeconds": 0, "RequiresPlainVideoItems": false, "RequiresPlainFolders": false, "EnableMSMediaReceiverRegistrar": false, "IgnoreTranscodeByteRangeRequests": false, "XmlRootAttributes": [], "DirectPlayProfiles": [{"Container": "opus", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "webm", "AudioCodec": "opus", "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "mp3", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "aac", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "m4a", "AudioCodec": "aac", "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "m4b", "AudioCodec": "aac", "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "flac", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "webma", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "webm", "AudioCodec": "webma", "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "wav", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "ogg", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}], "TranscodingProfiles": [{"Container": "ts", "Type": "Audio", "VideoCodec": "", "AudioCodec": "aac", "Protocol": "hls", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Streaming", "EnableSubtitlesInManifest": false, "MaxAudioChannels": null, "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}], "ContainerProfiles": [], "CodecProfiles": [], "ResponseProfiles": [], "SubtitleProfiles": [], "$type": "DeviceProfile"} jellyfin | [19:16:32] [INF] [40] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for {MYUSERNAME}. EnableAudioPlaybackTranscoding: True jellyfin | [19:16:50] [INF] [88] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app Jellyfin Web 10.8.13 playing Angry. Stopped at 8439 ms jellyfin | [19:16:50] [INF] [102] Jellyfin.Api.Controllers.UniversalAudioController: GetPostedPlaybackInfo profile: {"Name": null, "Id": null, "Identification": null, "FriendlyName": null, "Manufacturer": null, "ManufacturerUrl": null, "ModelName": null, "ModelDescription": null, "ModelNumber": null, "ModelUrl": null, "SerialNumber": null, "EnableAlbumArtInDidl": false, "EnableSingleAlbumArtLimit": false, "EnableSingleSubtitleLimit": false, "SupportedMediaTypes": "Audio,Photo,Video", "UserId": null, "AlbumArtPn": null, "MaxAlbumArtWidth": null, "MaxAlbumArtHeight": null, "MaxIconWidth": null, "MaxIconHeight": null, "MaxStreamingBitrate": 8000000, "MaxStaticBitrate": 8000000, "MusicStreamingTranscodingBitrate": 128000, "MaxStaticMusicBitrate": 8000000, "SonyAggregationFlags": null, "ProtocolInfo": null, "TimelineOffsetSeconds": 0, "RequiresPlainVideoItems": false, "RequiresPlainFolders": false, "EnableMSMediaReceiverRegistrar": false, "IgnoreTranscodeByteRangeRequests": false, "XmlRootAttributes": [], "DirectPlayProfiles": [{"Container": "opus", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "mp3", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "aac", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "m4a", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "flac", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "webma", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "webm", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "wav", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "ogg", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "mpa", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "wma", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}], "TranscodingProfiles": [{"Container": "mp3", "Type": "Audio", "VideoCodec": "", "AudioCodec": "aac", "Protocol": "hls", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Streaming", "EnableSubtitlesInManifest": false, "MaxAudioChannels": null, "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}], "ContainerProfiles": [], "CodecProfiles": [], "ResponseProfiles": [], "SubtitleProfiles": [], "$type": "DeviceProfile"} jellyfin | [19:16:50] [INF] [102] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for {MYUSERNAME}. EnableAudioPlaybackTranscoding: True jellyfin | [19:16:51] [INF] [88] Jellyfin.Api.Controllers.UniversalAudioController: GetPostedPlaybackInfo profile: {"Name": null, "Id": null, "Identification": null, "FriendlyName": null, "Manufacturer": null, "ManufacturerUrl": null, "ModelName": null, "ModelDescription": null, "ModelNumber": null, "ModelUrl": null, "SerialNumber": null, "EnableAlbumArtInDidl": false, "EnableSingleAlbumArtLimit": false, "EnableSingleSubtitleLimit": false, "SupportedMediaTypes": "Audio,Photo,Video", "UserId": null, "AlbumArtPn": null, "MaxAlbumArtWidth": null, "MaxAlbumArtHeight": null, "MaxIconWidth": null, "MaxIconHeight": null, "MaxStreamingBitrate": 8000000, "MaxStaticBitrate": 8000000, "MusicStreamingTranscodingBitrate": 128000, "MaxStaticMusicBitrate": 8000000, "SonyAggregationFlags": null, "ProtocolInfo": null, "TimelineOffsetSeconds": 0, "RequiresPlainVideoItems": false, "RequiresPlainFolders": false, "EnableMSMediaReceiverRegistrar": false, "IgnoreTranscodeByteRangeRequests": false, "XmlRootAttributes": [], "DirectPlayProfiles": [{"Container": "opus", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "mp3", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "aac", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "m4a", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "flac", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "webma", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "webm", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "wav", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "ogg", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "mpa", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "wma", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}], "TranscodingProfiles": [{"Container": "mp3", "Type": "Audio", "VideoCodec": "", "AudioCodec": "aac", "Protocol": "hls", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Streaming", "EnableSubtitlesInManifest": false, "MaxAudioChannels": null, "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}], "ContainerProfiles": [], "CodecProfiles": [], "ResponseProfiles": [], "SubtitleProfiles": [], "$type": "DeviceProfile"} jellyfin | [19:16:51] [INF] [88] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for {MYUSERNAME}. EnableAudioPlaybackTranscoding: True

Screenshots Self explanatory

System (please complete the following information): This is allegedly a pre-fork bug, so presumably it is present on all systems... Web-ui client:

Server running on same distro and version via linuxserver.io jellyfin image

Additional Context For what it's worth, the same issue is present on the Android app. On the android app, clicking the bottom control bar opens a "now playing" type screen where there are bigger controls, album art, etc. On that screen there is a usually a queue button that takes you to the queue. When casting that queue button disappears.

mcarlton00 commented 6 months ago

This isn't so much as bug in the web client as we'd initially assumed as a limitation of the api.

While yes, the api does supply information about what's in the play queue, it does that in the form of a list of item ids. Which is fine, but there's no metadata associated with them in the response, it's just the IDs. So then to display relevant information about those IDs to the user, it has to make more api calls for every id in the queue. As you can imagine, this is horribly slow and inefficient. Somebody had made a proof of concept of it working at some point and it took an exceedingly long time for it to populate the list of songs in the queue. There's just not a reasonably efficient way of retrieving all the data needed for display.

sashozahariev commented 4 months ago

Perhaps at least adding the number of items in the queue would be better, because currently there is absolutely no information whatsoever.