I think a good mechanism for this, that could be easily implemented and generalizable to other types of embeds is Picture-in-Picture.
It is already supported by Electron. In fact I can already enable it using the Developer Tools:
Would be a matter of providing better UX for it. I can also see this getting better as document Picture-In-Picture is already available in chrome, allowing for custom controls and varying video players.