I have moved the previous discussion from the module suggestion post to a specific one
I got it working. The problem comes with Webview2 security policies that don't allow the use of local resources when using
Webview:loadstring(), because the origin of the Webview content is set to
See [Login to see the link] for more on this
To make it works, you should put the html content in a separate file and load it directly from the Webview constructor call :
<title>Test Video Player</title>
<video controls style="top:0; left: 0; position: absolute; height: calc(100vh); width: 100%; object-fit: cover">
<source src="example.mp4" type="video/mp4">
local ui = require "ui"
local win = ui.Window("Test Video Player", 640, 540)
local wv = ui.Webview(win, "file:///"..sys.File("example.html").fullpath)
wv.align = "all"
Both files should be in the the current directory