OverPicture is a Safari Extension that
allows you to play any web video in Picture-In-Picture mode.
Press the play/pause button in any web video player in Safari and then in the toolbar PIP button and the video will start playing in Picture-In-Picture over your windows. And it will even embed custom buttons in some video players like YouTube.
OverPicture is now available also for the iPad, check it out on the iOS App Store!
Note: You have to open the app and then enable the Safari App Extension in Safari Preferences.