Firefox has been working on the Picture-in-Picture feature in Firefox Nightlies for some months now, adding in Play, Pause and Close buttons, and in a recent update added the ability to return a video back to the originating tab, the so-called Un-PiP or Back to Tab button.
The feature is currently disabled by default in Firefox Nightly and can be enabled by:
1. Visit about:config
2. Find or search for preference and
media. toggle its value from “false” to “true”.
The feature can be tested by right-clicking twice on a YouTube video and selecting “Picture in Picture”.
The feature is expected to ultimately hit the mainstream in Firefox 68.