You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Overlay "Controls" window on top of "Player" window.
MPV then binds to "Player" window
Wails then binds to "Controls" window (Or will create the child window refrencing "Player" window as parent)
Proof of Concept
Proof of Concept this repo uses libmpv and a fork of gonutz/wui to support keyed transparency.
Limitations
There is no current way to set the parent window handle, or create a layered window via wails.
With a custom fork of wails that lets you set a parent window handle, and creates mainWindow with extended window style set to WS_EX_LAYERED and uses SetLayeredWindowAttributes(handle, 0, LWA_ALPHA) (Using LWA_COLORKEY to mask window doesn't work (see this Webview2Feedback comment)
What Works:
[x] Create "player" window
[x] Have wails use the correct "player" handle for spawning the child window.
What Doesn't:
x Succesfully creates the window
x Window does not contain webview until you manually switch the location.href in devtools from about:blank to application URL
x Can not interact with webview (Possibly due to Transparency/LayeredWindow?)
Alternative Routes
Remember reading somewhere mpv supports taking a frame/buffer of some sort and displaying it as an overlay. This would be incredibly laggy for browser though.
Create OpenGL Renderer to pass to ffmpeg/browser. I don't even want to imagine how complicated that'd be lol.
Anyways, I'd appreciate any help I can get. Thank you!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Using Wails as GUI for MPV Player.
Overview
MPV then binds to "Player" window
Wails then binds to "Controls" window (Or will create the child window refrencing "Player" window as parent)
Proof of Concept
Proof of Concept this repo uses libmpv and a fork of gonutz/wui to support keyed transparency.
Limitations
There is no current way to set the parent window handle, or create a layered window via wails.
With a custom fork of wails that lets you set a parent window handle, and creates mainWindow with extended window style set to
WS_EX_LAYERED
and usesSetLayeredWindowAttributes(handle, 0, LWA_ALPHA)
(UsingLWA_COLORKEY
to mask window doesn't work (see this Webview2Feedback comment)What Works:
[x] Create "player" window
[x] Have wails use the correct "player" handle for spawning the child window.
What Doesn't:
x Succesfully creates the window
x Window does not contain webview until you manually switch the location.href in devtools from about:blank to application URL
x Can not interact with webview (Possibly due to Transparency/LayeredWindow?)
Alternative Routes
Anyways, I'd appreciate any help I can get. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions