A year ago, WhatsApp added picture-in-picture video playback in its iOS app. It wasn't until October that the feature made its way to Android in beta, then a few weeks ago, it rolled out to the stable version of the app. Now, it's making the switch from mobile to desktop, as PIP videos have appeared on WhatsApp Web.
You need v0.3.2041 of the web app to get PIP videos working. If you're on an older version, you'll have to force clear the page's cache and restart your browser. When it's working, you can click on any video preview to see it open in a floating window above your current conversation. You can move the video around, resize the window or switch to fullscreen, control playback and volume, and open the original URL if needed.
The feature should work for videos from YouTube, Facebook, Instagram, and Streamable, but only the first one is functional now. The others throw an error stating "The video can't be played" with a link to open it in a separate tab. It's likely that things aren't completely ready for public rollout yet.
Lastly, the native desktop versions of WhatsApp should support this in a future update, but for now, it's only the web app that has it.