stashapp / stash

An organizer for your porn, written in Go. Documentation: https://docs.stashapp.cc
https://stashapp.cc/
GNU Affero General Public License v3.0
8.44k stars 749 forks source link

[Bug Report] Chromecast direct streams with auth cannot be casted #5015

Open feederbox826 opened 1 week ago

feederbox826 commented 1 week ago

Describe the bug Externally initiated Chromecast casts fail when played from direct stream AND auth is enabled. This is not reproducible when casted from google's builtin cast sender, media controls or native <video> casting

To Reproduce Steps to reproduce the behavior:

  1. Connect Chromecast to cactoolv2 https://casttool.appspot.com/cactool/
  2. Grab direct stream URL from stash with authentication (/scene/#/stream?apikey=ey)
  3. Observe failiure as LOAD succeeds, but mediainfo and mediastatus are empty and chromecast is empty.
  4. Load stream URL with transcode (/scene/#/stream.mp4?apikey=)
  5. Observe stream.mp4 succeeding
  6. Disable authentication (/scene/#/stream)
  7. Load stream without authentication string
  8. Observe success

Expected behavior Chromecast streams should work with authentication enabled and with direct streams

Screenshots N/A

Stash Version: (from Settings -> About): v0.26.1-19-gb3d35dfa v0.26.1

Desktop (please complete the following information):

Smartphone (please complete the following information): N/A

Additional context I believe this might have something to do with how the link is interpreted or parsed.

An authenticated filebrowser instance (with JWT in queryStrings as well) also had issues casting via authenticated URL, unauthenticated filebrowser had no issues. Caddy static serve had no issues either. Home-Assistant also uses JWTs but seems to be fine