We've previously covered an app called YouTube Floating Popup Player which let you watch YouTube videos anywhere on your Android device, but it has since been removed from the Google Play Store due to infringement of certain policies.
We've also shown you Viral HD YouTube Popup Player, which is pretty much a full-blown YouTube replacement app, complete with floating windows. However, it only lets you view YouTube videos, which is a drawback when there are so many good video hosting sites out there.
If you want floating windows for YouTube videos as well as Facebook, TED, Vimeo, Vine, and other media sites, there's a better option. The only downside is that it requires root access.
To get your video floating over your display, you'll need to be rooted with the Xposed Framework installed, as well as have installation of apps from "Unknown sources" enabled. (If you're running Android's latest operating system, find out how to install the Xposed Framework on Lollipop.)
Other than selecting the video quality, the settings do not offer much, or need to. Other options include purchasing the premium version, which will allow for video downloading and playback longer than five minutes, as well as enabling "Background playing."
The floating window is functional with apps like YouTube, Vine, Vimeo, and any other application that does not implement a custom video player like VLC or MX Player.
To use it, simply start playing a video (through the official YouTube app or the web). When the Awesome Pop-up Window notification shows up, just tap it to pop up your video window.
The window is easily adjustable with some pinching gestures or by using the window icons. It can be dragged and dropped anywhere and functions within any app.