The following code shows a player but will not load the local video:
local html = [[<!doctype html>
<html>
<head>
<title>Test Video Player</title>
</head>
<body>
<video width = 400 controls>
<source src="example.mp4" type="video/mp4">
</video>
</body>
</html>
local win = ui.Window("Test Video Player", 640, 540)
local wv = ui.Webview(win, "'")
wv.align = "all"
function wv:onReady()
wv:loadstring(html)
end
win:center()
ui.run(win):wait()
I am also assuming JavaScript run via Webview.eval also cannot access the local file system. Is there any work around that won't require me to install node.js or something else equally elaborate? Microsoft's WebView2 documentation basically suggests a WebView is a lightweight browser with the usual security restrictions such as no local file access.
If there isn't a good, simple work around, I'll just stick to my Python player until and unless LuaRT has a video module that can play local files.