Fixed Twitch Stream Embedding
- Issue: Twitch streams were failing to load due to Content Security Policy (CSP) violations and missing parent parameter
- Error Messages:
- "Refused to frame 'https://www.twitch.tv/' because an ancestor violates the following Content Security Policy directive"
- "Twitch embed error message:[NoParent] parent query string value was not specified"
- Solution: Updated Twitch iframe implementation to use proper parent parameter for Electron environment
- Affected File:
src/renderer/src/components/StreamCard.tsx
Technical Details
- Implemented request interception in Electron main process to add parent parameter to Twitch embeds
- Removes Content-Security-Policy headers from Twitch responses
- Added permissive CSP meta tag to HTML for iframe compatibility
- Uses direct iframe embedding for Twitch streams with parent=localhost
- ReactPlayer continues to handle all other stream types (YouTube, HLS, DASH, etc.)
What's Changed
- fix: resolve Twitch embed CSP errors with iframe and request intercep… by @LordKnish in #8
Full Changelog: v1.2.0...v1.2.1