Preview YouTube Video

James builds the training-materials authoring tool at an industrial-equipment manufacturer. Field technicians need step-by-step service walkthroughs, and the format the company has standardised on is: written procedure, photo of the part, and a short YouTube clip of a senior tech doing the actual repair. The authoring tool is WinFormHtmlEditor, and authors paste YouTube embed codes straight into the document.

On James's development laptop, every embed plays. He demos it to the training director, every embed plays. The first wave of field laptops gets the tool, and half the technicians cannot get any video to load. The same document. Same network. Same YouTube URL. James spends an afternoon staring at <iframe> markup before he realises the editor's clean storage of the HTML is not the issue; the issue is what hosts the rendering.

WysiwygDesign mode showing a YouTube iframe placeholder that does not play

What is actually happening: IE7 emulation

The editor's WYSIWYG and Preview modes are hosted by the standard WebBrowser control, which is a thin wrapper around MSHTML -- the Internet Explorer rendering engine. For backwards compatibility, hosted WebBrowser controls default to IE7 emulation regardless of which version of Internet Explorer is installed on the machine. YouTube's modern iframe embed assumes a current browser -- HTML5 video, modern JavaScript, current TLS ciphers -- and silently degrades or refuses to load on IE7-emulated MSHTML.

James's laptop happened to have an old FEATURE_BROWSER_EMULATION registry value set during an earlier WebView trial; the field laptops did not. Same code, different host emulation level, different outcome. The editor itself cannot raise the emulation level at runtime -- Windows resolves it once when the WebBrowser is instantiated by reading the registry.

Step 1: confirm playback works in Preview

Authors should verify their embeds in EditorModes.ReadOnlyPreview, which renders the document the way a technician will see it. With the registry tweak below applied, Preview plays YouTube embeds the same as any modern browser. WYSIWYG mode is for authoring; Preview is for verification.

// Toggle to Preview to verify a YouTube embed plays:

htmlEditor1.EditorMode =

    SpiceLogic.HtmlEditor.Abstractions.EditorModes.ReadOnlyPreview;
ReadOnlyPreview mode playing the same YouTube embed after FEATURE_BROWSER_EMULATION is set

Step 2: register the executable for modern emulation

James ships a registry entry that upgrades his application's WebBrowser host to IE11 edge mode. Add a DWORD value named after the exe filename (including the extension) with value 11001 decimal under FEATURE_BROWSER_EMULATION:

Windows Registry Editor Version 5.00



; Per-user (no admin required):

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]

"TrainingAuthor.exe"=dword:00002af9



; Per-machine (admin required):

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]

"TrainingAuthor.exe"=dword:00002af9

Common decimal values: 11001 (IE11 edge), 11000 (IE11), 10001 (IE10 edge), 9999 (IE9). The hex equivalent of 11001 is 0x00002AF9. If the design surface should also render modern content for authors, register devenv.exe too -- otherwise Visual Studio's design-time preview keeps using IE7 emulation even when the built application runs in IE11 mode.

Step 3: ship it from the installer (or set it at startup)

James's WiX installer is the right place to write the registry key; the field-laptop image picks it up automatically on next deploy. For shops without an installer pipeline, set the value at application startup before any WinFormHtmlEditor instance is constructed. The host process picks the emulation level up the first time it instantiates a WebBrowser:

using Microsoft.Win32;



static void SetIeEmulation()

{

    string exe = System.IO.Path.GetFileName(

        System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName);



    using var key = Registry.CurrentUser.CreateSubKey(

        @"Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION");

    key.SetValue(exe, 11001, RegistryValueKind.DWord);

}

The long view

FEATURE_BROWSER_EMULATION caps out at IE11. Sites that drop IE11 support entirely will eventually fail in Preview even with the registry tweak in place. For applications where modern embed compatibility is critical, the long-term direction is a WebView2-backed editor host; that work is tracked on the product roadmap. In the meantime, the IE11 emulation switch keeps YouTube, Vimeo, and the major embed providers working today.

Last updated on May 15, 2026