Add casting: Chromecast + DLNA receivers#67
Open
savvystartagency wants to merge 1 commit into
Open
Conversation
Adds a Cast button to Movie, TV and Downloads pages plus a device-picker
modal and mini-controller. Streams anime mp4, anime Sl-Hls, vidsrc /
videasy / 2embed HLS captures, and completed local downloads to any
Chromecast-built-in device (incl. XGIMI Android TV projectors) or DLNA
renderer on the LAN.
Highlights
- New main-process module src/ipc/cast.js
- Discovery: bonjour-service (_googlecast._tcp) + dlnacasts3 SSDP
- LAN-routable HTTP server bound 0.0.0.0:<random>
- /file/:token range-supported local file serve
- /proxy/:token header-injecting proxy with on-the-fly HLS playlist
rewriting (segments + EXT-X-KEY / EXT-X-MAP child tokens) so
receivers always speak to a Referer-injecting proxy
- /sub/:token VTT with CORS, inline SRT->VTT conversion
- Single active session (mirrors PIP). castv2-client for Chromecast,
dlnacasts3 for DLNA. Clean disconnect on before-quit.
- Preload bridge: cast:* IPC surface modeled on existing PIP naming.
- Renderer
- useCast() hook (src/utils/useCast.js) for device list + session state
- CastPickerModal with recent / available device lists, CAST/DLNA badges
- CastMiniController with play/pause/scrubber/CC toggle/volume/stop
- CastIcon + CastingIcon in Icons.jsx
- Wired into MoviePage, TVPage, DownloadsPage; Sidebar status via
the global mini-controller variant
- Settings: new "Cast & Devices" section (auto-discover, include-DLNA,
auto-stop, preferred device, rescan, limitations notes).
- Storage: CAST_* keys for the above preferences.
Dependencies
- castv2-client (Chromecast control)
- bonjour-service (mDNS for _googlecast._tcp)
- dlnacasts3 (DLNA SSDP + AVTransport)
All pure JS, no native deps.
Owner
|
Looks interesting, I suppose you have a Device to test this? Because I do not xD... Also, do you understand the Code you shared here? |
Author
|
yes, I am using it on my projectors and my TV :) ;) |
Author
|
I am just adding some controls, will push shortly |
c831caf to
5df2c8a
Compare
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
Adds a Cast button to Movie / TV / Downloads pages plus a device-picker modal and a mini-controller. Streams anime mp4, anime Sl-Hls, vidsrc / videasy / 2embed HLS captures, and completed local downloads to any Chromecast-built-in device (incl. XGIMI Android TV projectors) or DLNA renderer on the LAN.
Highlights
src/ipc/cast.js— main-process subsystem. Discovery viabonjour-service(_googlecast._tcp) +dlnacasts3SSDP. Single active session (mirrors PIP) viacastv2-clientfor Chromecast anddlnacasts3for DLNA. Clean disconnect onbefore-quit.0.0.0.0:<random>(separate from the 127.0.0.1 allmanga player server):/file/:token— range-supported local file serve/proxy/:token— header-injecting proxy with on-the-fly HLS playlist rewriting (segments +EXT-X-KEY/EXT-X-MAPchild tokens) so receivers always speak to a Referer-injecting proxy/sub/:token— VTT with CORS, inline SRT→VTT conversioncast:*IPC surface modelled on existing PIP naming.useCast()hook,CastPickerModal,CastMiniController(play/pause/scrubber/CC/volume/stop),CastIcon+CastingIcon. Wired into MoviePage, TVPage, DownloadsPage.CAST_*keys.Dependencies
castv2-client,bonjour-service,dlnacasts3— all pure JS, no native deps.Test plan
Known limitations (surfaced in Settings notes box)