feat(web-player): copy media links with middle-click - #737
Merged
Conversation
Contributor
Documentation previewThe documentation preview has been deployed for this pull request. |
stackia
marked this pull request as ready for review
September 2, 2026 09:08
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 74c0b43. Configure here.
Middle-click a channel to copy its live URL, or a program to copy the catch-up URL for that timeslot, then show a toast on success. Co-authored-by: Stackie Jia <jsq2627@gmail.com>
cursor
Bot
force-pushed
the
cursor/copy-media-direct-link-77d2
branch
from
September 2, 2026 09:44
74c0b43 to
f68b881
Compare
Co-authored-by: Stackie Jia <jsq2627@gmail.com>
Drop the copy-media-link bullet from the features list; the dedicated section already covers it. Co-authored-by: Stackie Jia <jsq2627@gmail.com>
Middle-click copy is a hidden gesture; the button title delayed native tooltip on hover. Co-authored-by: Stackie Jia <jsq2627@gmail.com>
Append-mode copy concatenated `$HD` onto the live path before the query. Stripping treated `$HD?playseek=…` as one label and dropped the time range. Co-authored-by: Stackie Jia <jsq2627@gmail.com>
Copied media links now carry a friendly r2h-filename query parameter. Multicast and RTSP MPEG-TS responses emit Content-Disposition so browsers save the file with a .ts name. The parameter is stripped before upstream requests and ignored by HTTP/HLS proxying. Co-authored-by: Stackie Jia <jsq2627@gmail.com>
strcasecmp() was reading past the sanitized filename, so names that already ended in .ts could pick up a second suffix. Co-authored-by: Stackie Jia <jsq2627@gmail.com>
Simple theme was reusing the video overlay background, which is always slate-900. Give toasts their own semantic surface so light+simple stays light while dark+simple and fancy are unchanged. Co-authored-by: Stackie Jia <jsq2627@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Middle-click a channel in the channel list, or a program in the EPG, to copy a directly requestable HTTP media URL. A toast confirms success.
This addresses the download workflow in #718: IDM cannot sniff MSE playback, but users can now copy the live or catch-up URL into FFmpeg, N_m3u8DL-RE, IDM, or another player.
Copied multicast and RTSP links also include
r2h-filename. The daemon emitsContent-Disposition: attachmenton MPEG-TS responses so a browser download uses a friendly.tsname (channel, source label, program title, time range). The parameter is local to rtp2httpd: it is stripped before upstream RTP/RTSP/HTTP requests and is ignored by HLS/HTTP proxying.Rebased onto latest
mainso this shares catch-up helpers from #736:buildCatchupUrl(extracted from the nested parser copy)CATCHUP_MIN_DURATION_MS/CatchupProgramBoundfromcatchup-windows.ts[start, end]URL; it does not useplanCatchupSegmentWindows(that planner is for multi-chunk playback)Behavior:
playseekplaceholders filled)$labelsuffixes are stripped, andr2h-tokenis preserved when present on the pager2h-filename; multicast HEAD/GET and RTSP HEAD/GET returnContent-DispositionTest plan
/playerwith a playlist that has live channels and catch-up + EPGr2h-filenamecurl -I):Content-Dispositionuses the.tsnamer2h-filename)r2h-token, confirm the copied link includes itpnpm run web-ui:testcoversbuildCatchupUrl,getProgramMediaUrl, filename sanitizing, andr2h-filename./scripts/run-e2e.shcovers multicast/RTSPContent-Disposition, header injection sanitizing, empty param omission, and HTTP/RTSP upstream stripping