WPF WebBrowser Issue: Video Not Displaying in Custom HTPC Interface

Hey folks, I’m working on a basic HTPC interface and ran into a snag. I’m using WPF and added a System.Windows.Controls.WebBrowser to show a video site. Everything looks fine except the actual video won’t show up. It’s weird because other pages work great, including regular video sites.

I made sure to compile for x86 so Flash would work. The strangest part? It worked perfectly the first time I tried it, but now it’s just a black screen where the video should be.

Any ideas on what could be causing this? Is there some difference between IE and the WPF browser control that might explain it? I’m scratching my head here. Thanks for any help!

Have you considered using an alternative like WebView2? I’ve found it to be more reliable for multimedia content in WPF applications. It’s based on Microsoft Edge’s Chromium engine, which offers better compatibility with modern web standards and video playback.

To implement it, you’d need to install the Microsoft.Web.WebView2 NuGet package and replace your WebBrowser control with WebView2. The migration process is relatively straightforward, and it could potentially solve your video display issues without much hassle.

If you’re set on using the WebBrowser control, try explicitly setting the DocumentText property with the HTML content of the video page. This approach sometimes bypasses rendering quirks in the control. Just ensure you’re not violating any terms of service by doing so.

hey tom, had similar probs. try updating ur graphics drivers, sometimes that fixes weird video issues. also, check if ur antivirus is blocking anything. if nothing works, maybe look into using vlc activex control instead? it’s pretty good for video stuff in custom apps. good luck!

I’ve encountered similar issues with the WPF WebBrowser control before. In my experience, it’s often related to the browser’s rendering engine being outdated. One workaround I found effective was switching to the CefSharp library, which uses Chromium as its base. It’s more modern and handles video playback much better.

If you prefer sticking with the built-in control, try setting the BrowserEmulation registry key to force a newer IE version. Sometimes, that resolves video playback problems. Also, double-check your security settings - overly strict configs can interfere with video loading.

Lastly, if it worked once but not anymore, clear your browser cache and reset IE settings. Occasionally, corrupted temporary files can cause such quirks. Hope this helps you troubleshoot the issue!