You can already use the picture-in-picture mode (PiP) on Android TV, a feature that will also be available on mobile devices running Android O. In case you don’t know, PiP allows you to keep watching a video while you’re simultaneously using another app.
The good news is that those of you on the Developer Preview of the latest version of Android can already use the feature, thanks to a simple tweak that will add a new button to the navigation bar. The first thing you have to do is activate the System UI Tuner in Quick Settings by holding down the Settings icon. Then navigate to Settings > System > System UI Tuner > Navigation bar and enter 171 in either the Left or Right keycode, which should enable the PiP mode on your device.
Once that’s done, you’ll probably want to test it out, right? Open the YouTube app, play a video, and then tap the new button. This will shrink the video into a tiny window, which will keep on playing. It should stay on top of any other app you open up and can easily be moved around the screen. You can see the feature in action in the video below.
You can reopen the YouTube app by double tapping on the video, while a single tap will bring up small controls that can be used for pausing the video and closing the window. Just in case you decide to try to enable this new feature, I must mention that it does have a few bugs, so it might not run quite as smoothly as you would like.