When you click ▶ Cast to TV, PC Caster starts the local HLS proxy, checks that Windows Firewall allows the Roku to reach your PC, and uses the Roku External Control Protocol (ECP) API to launch the custom PC Caster channel on your TV — passing it the proxied stream URL so the Roku can play it without needing to send any special headers. The entire chain from click to playback typically completes in a few seconds.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/iluisgm/PC_Caster/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before clicking Cast to TV, make sure you have:- A Roku device visible in the device list (run a scan or add it by IP — see Device Management)
- A stream URL in the URL box, either captured with 🔍 Find .m3u8 or pasted directly
- The TV App installed on your Roku via 📺 TV App (one-time setup — see the First-time TV setup guide)
The casting flow
Check the device list
Make sure your Roku appears in the device list. If it doesn’t, click ↺ Scan or use + Add IP to add it manually.
Select your Roku
Click the Roku’s row in the device list to select it. The selected row highlights blue.
Confirm the stream URL
Check that the URL box contains a
.m3u8 URL. If not, use 🔍 Find .m3u8 to capture one from the streaming page.Click Cast to TV
Click ▶ Cast to TV. The button changes to ⏳ Casting… while the app contacts the Roku.
What happens behind the scenes
When you click Cast to TV with an HLS stream URL:-
Proxy start —
HlsProxy.start(target_ip)is called with the Roku’s IP. This binds the proxy to the local network interface that can reach the Roku and starts listening on port8011. The proxy URL for the stream is generated usingHlsProxy.url_for(real_m3u8, referer), producing an address like: -
Firewall check —
ensure_firewall_rule(8011)is called. If a Windows Firewall inbound rule for port8011doesn’t exist yet, a UAC prompt appears asking for permission to add one. This happens only once. -
Channel launch —
roku_deploy.launch(ip, cast_url, fmt)calls the Roku ECP endpoint:The Roku opens the PC Caster channel and begins streaming from the proxy URL. -
Auto-sideload — If the PC Caster channel is not yet installed on the Roku,
roku_deploy.sideload()runs automatically to upload it before launching.
Receiver mode options
The receiver mode controls which Roku channel PC Caster uses to play the stream. Configure it in 📺 TV App.| Mode | When to use |
|---|---|
| My TV App (default, recommended) | Uses the custom PC Caster channel (mychannel). The only mode that reliably plays header-locked streams via the proxy. |
| Roku Media Player | The Roku built-in channel (mediaplayer). Cannot send custom headers, so streams that need a Referer will fail with a 403. |
| Castify | Experimental (castify). May not behave reliably with all streams. |
Status bar states
The proxy indicator in the bottom-right corner of the status bar reflects the current proxy state in real time:| Indicator | Meaning |
|---|---|
○ Proxy off | The proxy has not been started yet. |
● Proxy ready (idle) | The proxy is running but the Roku hasn’t requested anything recently. |
⚡ Streaming to TV · N reqs | The Roku is actively pulling segments through the proxy. The request count updates every second. |
Token expiry and mid-stream 403s
CDN stream tokens have a limited lifespan — typically between 30 minutes and a few hours. When a token expires, the CDN returns403 Forbidden and playback stops. The proxy log records this as proxy upstream HTTP 403.
To resume, simply click 🔍 Find .m3u8 again on the same page, select the fresh stream URL, and click ▶ Cast to TV. The new URL will have a valid token.
