It's been available on Android since 2017's Oreo, but now, picture-in-picture is coming to Windows, Mac, and Linux with Chrome 70. Android Police reports that it's now enabled by default. The functionality you want to use on a per-website basis by web developers, after which you'll be able to overlay an online video on your desktop will be kept in sight, regardless of which website or program you're using ,
If you want to see how it works, you can go to YouTube, where you can right-click any video twice and click "Picture in Picture" from the context menu. Once you enable picture-in-picture mode, Chrome will show a speaker symbol to let you locate the source of any audio that's playing. The video overlay can be dragged anywhere on the screen with a quick drag and drop.
Although the functionality is now enabled, it's up to developers to add it to their websites. YouTube already supports it (albeit via a clunky method that will almost certainly change), but otherwise, you're going to have a Chrome Extension to enable it for other websites.