macOS Sierra has a pretty neat new feature called Picture in Picture. It works with videos you are viewing in Safari and allows you to pop the video out of the Safari window. You can position it in any corner of the screen and watch the video while you work on something else. The feature, in theory, should work on just about any video streaming website. It works on YouTube and any other website with an HTML5 player. Here’s how to enable it.
Open Safari and play a YouTube video. Right-click inside the video player. Normally, when you right-click inside the YouTube player, you see controls for copying a link to the video or looping it. What you need to get is the menu pictured below. It has options for viewing the video in full screen, entering Picture in Picture mode, opening the video in a new window, and copying the video’s address.
To get this menu, you must right-click inside the video player a second time. Clicking outside it will not work. Once you see the menu, select ‘Enter Picture-in-Picture’.
The video will pop out of the Safari window and snap to the top right corner of your screen. To move it to a different corner, hold down the Command key and use the arrow buttons to move it.
You can close the video by clicking the close button at the top left. When you position your mouse cursor over the video, control buttons for pausing it and returning to windowed mode appear. You can also drag it around to position it wherever you want on the screen. The video player can be resized by clicking and dragging it by the corner.
The video picks up where it left off seamlessly when you switch to and back from Picture-in-picture mode. Apple says Picture-in-Picture will work on any website that supports an HTML5 player. Websites that do not have an HTML5 player will have to be optimized to add support for it.
At present, Picture-in-picture only works inside Safari and not other browsers available for macOS. It is strictly a Sierra feature so older macOS versions will not have it.