cef支持 html5播放mp4,c# - How can I play html5 player video in cefsharp - Stack Overflow

欧阳飞
2023-12-01

I used cefsharp in c# winforms

under is the my code

public Form1()

{

InitializeComponent();

InitBrower();

}

public ChromiumWebBrowser browser;

private void InitBrower()

{

//Cef.Initialize(new CefSettings());

CefSettings settings = new CefSettings();

settings.CefCommandLineArgs.Add("enable-media-stream", "1");

settings.CefCommandLineArgs.Add("allow-running-insecure-content", "1");

settings.CefCommandLineArgs.Add("use-fake-ui-for-media-stream", "1");

settings.CefCommandLineArgs.Add("enable-speech-input", "1");

settings.CefCommandLineArgs.Add("enable-usermedia-screen-capture", "1");

settings.CefCommandLineArgs.Add("debug-plugin-loading", "1");

settings.CefCommandLineArgs.Add("allow-outdated-plugins", "1");

settings.CefCommandLineArgs.Add("always-authorize-plugins", "1");

settings.CefCommandLineArgs.Add("disable-web-security", "1");

settings.CefCommandLineArgs.Add("enable-npapi", "1");

Cef.Initialize(settings);

browser = new ChromiumWebBrowser("https://videojs.com/city");

this.panel1.Controls.Add(browser);

browser.Dock = DockStyle.Fill;

}

but the video in that link does't not work

I think maybe cefsharp doesn't support html5 player, because copyright trouble

Is there any way to support html5 player in cefsharp?

 类似资料: