Why it matters: If you have ever wanted to watch a YouTube video but were busy doing something else, a picture-in-picture (PiP) mode would be convenient. Fortunately for Safari users, it is easy to enable PiP. Twitter user Ricky Mondello tweeted this trick over the weekend.

Editor's note: Opera browser offers similar functionality built-in, with the advantage that it's available for Windows, macOS and Linux.

To enable picture in picture in macOS, browse to the YouTube video you want to watch in Safari. Right-click anywhere on the video twice. The first click will pull up the video player’s context menu, such as loop or copy video URL. The second will open a Safari drop-down with other options, including “Enter Picture in Picture.”

Selecting PiP will open the video in the corner of the screen. You may move the video by dragging it as you would any other window. When you release the left button on the mouse, the PiP window will snap to the nearest corner. If you prefer to have it floating somewhere else, hold the Command key while dragging to place it anywhere on the screen.

Once the mode is activated, you can open a new tab in Safari, and the video will continue playing in the corner of the screen. Additionally, since it is its own window, you can view it even in other applications such as a spreadsheet or word processor. The PiP video will remain on top regardless of window focus.

The PiP player is barebones, though, and only allows you to play and pause the video. To close it, there is a close button (x) in the upper left corner or a return to window button to the left of the play icon. Both perform the same function by returning the video to its Safari tab. It is worth mentioning that PiP does not only work on YouTube, but for any website containing video. However, you have to go about activating it differently.

If you have a MacBook Pro, there is a button that appears on the Touch Bar when the Safari window is focused and a video is playing. Its icon looks like a small filled-in box inside a square. You can alternatively enable PiP, on any non-YouTube website by right-clicking the speaker icon on the Safari tab while the video is playing and selecting the mode.

You can test it without leaving this article by starting the video below and trying it. Warning: Do not let that song play too long or it will get stuck in your head.

Judging by some of the comments on the tweet, this feature has been available for a while, but it is one that flew under my radar. Thanks for the tip Ricky!