I know about chrome restrictions, and already use "--autoplay-policy=no-user-gesture-required" command line option. For html5 audio tag, or youtube video this option is help, but not for html5 video tag.
Application type: Offscreen.
This is my CefSettings:
- Code: Select all
var cefSettings = new CefSettings
{
RootCachePath = cache,
CachePath = cache,
CefCommandLineArgs = { ["disable-gpu-shader-disk-cache"] = "1", ["autoplay-policy"] = "no-user-gesture-required" },
CommandLineArgsDisabled = true,
WindowlessRenderingEnabled = true
};
This is example of the html page:
- Code: Select all
<html>
<header></header>
<body>
<video autoplay controls>
<source src="video.mp4">
</audio>
</body>
</html>
I also tried to playing this page from the chrome browser, and autoplay is worked (If chrome started with --autoplay-policy=no-user-gesture-required option).