# YouTube Autoplay on Tauri Desktop (WKWebView) — Cannot Work **Status**: Confirmed impossible. All JS/CSS approaches exhausted. **Date**: February 2026 **Affects**: Live News panel, Live Webcams panel (macOS desktop app) **Root cause**: WKWebView blocks programmatic media playback in cross-origin iframes without a direct user gesture. --- ## Architecture ``` tauri://localhost (main webview) └── http://localhost:PORT (sidecar youtube-embed handler) └── https://www.youtube.com/embed/VIDEO_ID (YouTube IFrame Player) ``` Three nested origins. The YouTube player sits inside a sidecar-served HTML page, which sits inside the Tauri WKWebView. The user gesture context is lost crossing each origin boundary. --- ## What Was Tested (All Failed) ### 1. `allow="autoplay"` iframe attribute **What**: Set `allow="autoplay; encrypted-media"` on the sidecar's `