Skip to content

Fix Chromecast casting with Redirect profile and auto refresh stream on session end - #119

Merged
ardoviniandrea merged 1 commit into
ardoviniandrea:devfrom
dennisoderwald:main
Sep 16, 2026
Merged

ardoviniandrea merged 1 commit into
ardoviniandrea:devfrom
dennisoderwald:main

Conversation

@dennisoderwald

@dennisoderwald dennisoderwald commented Feb 10, 2026

Copy link
Copy Markdown

This PR fixes two issues (#118) with Chromecast functionality:

Issue 1: Redirect profile doesn't properly construct stream URL for Chromecast

Changes:

  • Modified loadMedia() in cast.js to detect when a raw stream URL (from Redirect profile) is passed
  • Instead of just appending parameters, the function now properly constructs a /stream endpoint URL with:
    • url
    • profileId
    • userAgentId
  • Uses guideState.settings.activeStreamProfileId to determine if the current profile is a redirect profile

Issue 2: No stream reload when Chromecast session ends

Changes:

  • Added import of forceRefreshStream from player.js in cast.js
  • In handleSessionStateChange(), when SESSION_ENDED occurs, the function now calls forceRefreshStream()
  • This automatically restarts the stream in the local player, similar to clicking the refresh button

@dennisoderwald

Copy link
Copy Markdown
Author

It would make sense to introduce a function such as buildStreamUrl to avoid redundancy when constructing the stream URL. However, I didn't want to make a design decision here @ardoviniandrea.

@ardoviniandrea
ardoviniandrea changed the base branch from main to dev September 16, 2026 09:47
@ardoviniandrea
ardoviniandrea merged commit fb04d9a into ardoviniandrea:dev Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants