Skip to content

fix(web-ui): strip host from M3U URLs in web player#577

Merged
stackia merged 1 commit into
mainfrom
fix/web-player-m3u-relative-paths
Jun 25, 2026
Merged

fix(web-ui): strip host from M3U URLs in web player#577
stackia merged 1 commit into
mainfrom
fix/web-player-m3u-relative-paths

Conversation

@stackia

@stackia stackia commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add toPlaylistRelativePath() to strip http(s)://host:port from M3U URLs and keep site-root-relative paths
  • Apply the rewrite when parsing channel URLs, EPG (x-tvg-url), and catchup sources in the web player
  • Preserve $label suffixes and query-only catchup templates unchanged

This mirrors server use-relative-path-in-m3u output so playback and EPG requests follow the browser's current origin (reverse proxy, custom host, PWA, etc.).

Test plan

  • Open the built-in player via a host/port different from the one embedded in playlist.m3u and verify channels play
  • Confirm EPG loads when x-tvg-url in M3U uses an absolute URL with a different host
  • Verify multi-source channels with $label suffixes still switch correctly
  • Verify catchup playback still works for append-mode (?playseek=...) and default-mode catchup sources

Treat absolute playlist URLs as site-root-relative paths so playback
and EPG requests follow the browser's current origin, matching
use-relative-path-in-m3u server output.
@github-actions

Copy link
Copy Markdown
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-water-0a297bf00-577.eastasia.1.azurestaticapps.net

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 004f2ea7a5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread web-ui/src/lib/url.ts
@stackia stackia merged commit 8784b3d into main Jun 25, 2026
10 checks passed
@stackia stackia deleted the fix/web-player-m3u-relative-paths branch June 25, 2026 12:17
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.

1 participant