The Picture-in-Picture feature was touted by Apple as one of the benefits of macOS Sierra and it surely is, but in YouTube it is very difficult to find. YouTube dominates video viewing and so it makes sense for it to be obvious, but it is actually hidden unless you know where to go. I am sure this will change in time and that the online service will be tweaked. Until then, read on-
Open a video in YouTube and right-click on it.
You will see a menu appear. Now here is the odd part because you need to right-click on the video again in a different spot to bring up the following menu-
You can now click ‘Enter Picture-in-Picture’ and the following will happen at which point you can change the size and view it while doing something else.
The feature is available in YouTube, but as you can see it is currently far from obvious.