News for hackers. Stuff that matters.
Re:Firefox Picture-in-Picture by bentcorner on Wednesday July 08, 2020 @11:59AM (#23771153)
PiP is such a great feature. I have no idea how easy/hard it was to implement but it feels nice to use. It does exactly what you'd expect it to do and nothing more.

I use it while watching overwatch league games in the browser because it allows me to resize the popped-out video arbitrarily, instead of the site's embedded youtube player options of either tiny-window-in-browser or full-screen sizes (there is no theater mode in the embedded player for some reason).

Re:Firefox Picture-in-Picture by jiripospisil on Wednesday July 08, 2020 @12:47PM (#23771632)
If you're interested in seeing it getting implemented, you can check out Mike Conley's YouTube channel. He regularly streams Firefox development and he's the main force behind PiP in Firefox. I believe the first episode where it's mentioned is #165 [0] but it spans over many of them.

[0] https://www.youtube.com/watch?v=2_5zwg9Ucoc

Re:Firefox Picture-in-Picture by cpeterso on Wednesday July 08, 2020 @07:04PM (#23775216)
Here’s a Mozilla blog post from Mike Conley and Emanuela Damiani about implementing PiP in Firefox:

https://hacks.mozilla.org/2020/01/how-we-built-picture-in-pi...

Re:Firefox Picture-in-Picture by asdff on Wednesday July 08, 2020 @12:45PM (#23771616)
It is a little clunky and could use a good deal of polish. For example, you can only PiP one video, and controls remain in the tab with the video frame. PiP only gives you play/pause, no scrubbing or anything from the embedded player. The always on top is a feature for some, but can be a hindrance, too. That behavior should be a toggle for the user so they can use their tools how they like.
Re:Firefox Picture-in-Picture by catalogia on Wednesday July 08, 2020 @01:51PM (#23772349)
These are a few of the reasons I've continued to use the "Open With" extension with mpv. ([right-click]->Open With->mpv) This provides full playback control, lets me toggle stay-on-top, etc. Firefox's PiP is a nice thought but just isn't right for me as currently implemented.
Re:Firefox Picture-in-Picture by apetresc on Wednesday July 08, 2020 @02:17PM (#23772688)
Sorry, which extension is this? The only one I was able to find named "Open With" is pretty clearly not what you were referring to.
Re:Firefox Picture-in-Picture by ubercow13 on Wednesday July 08, 2020 @02:47PM (#23773000)
I prefer this one as it is potentially more secure than some of the other ones

https://github.com/grmat/play-with

Re:Firefox Picture-in-Picture by catalogia on Wednesday July 08, 2020 @02:48PM (#23773019)
This is the one I currently use: https://github.com/darktrojan/openwith Perhaps play-with is a better choice.
Re:Firefox Picture-in-Picture by vezycash on Wednesday July 08, 2020 @02:26PM (#23772787)
MPV is a player. https://mpv.io/
Re:Firefox Picture-in-Picture by apetresc on Wednesday July 08, 2020 @02:56PM (#23773097)
Oh, I know all about MPV. Invoking it cleanly from within Firefox is the part I was asking about (and which has been answered :)
Re:Firefox Picture-in-Picture by StavrosK on Wednesday July 08, 2020 @05:31PM (#23774463)
That's what I do as well, and it's fantastic. Bonus functionality: Get MPV to always open on the second screen fullscreen (if you have one) and have it be always-on-top, small and on the bottom right corner when non-fullscreen, so you can just press Esc on the full-screen mpv window and get a PiP-like window.
Re:Firefox Picture-in-Picture by samoa42 on Wednesday July 08, 2020 @02:41PM (#23772937)
samesame

also;

* rank up the cache settings in mpv to prebuffer the whole vid

* see the ytdl-format setting in mpv.conf to select a codec that your machine can decode in hardware for enhanced power efficiancy (lower fanspeed)

Re:Firefox Picture-in-Picture by michaelmrose on Wednesday July 08, 2020 @04:18PM (#23773801)
if you like vim like keybindings courtesy of tridactyl

bind V hint -W ! mpv to show a letter or letters adjacent to all links and open the one chosen in mpv. Normally most pages have few enough links visible that hints are either 1 or 2 characters. This means instead of picking up the mouse you can hit 3 keys.

Re:Firefox Picture-in-Picture by bovine3dom on Wednesday July 08, 2020 @05:11PM (#23774271)
You can get most pages down to 1 character if you craft your own custom selector, e.g. https://github.com/tridactyl/tridactyl/blob/dc8919e7e65d5dfa...

For the record we don't recommend piping straight to `!` as a malicious (and fairly Tridactyl specific) site could use it to execute whatever it wanted. We have a default bind for open in mpv that sanitises things - https://github.com/tridactyl/tridactyl/blob/dc8919e7e65d5dfa... using https://github.com/tridactyl/tridactyl/blob/dc8919e7e65d5dfa...

Re:Firefox Picture-in-Picture by michaelmrose on Friday July 10, 2020 @05:08PM (#23796474)
Thanks. A question occurs to me shouldn't such sanitation be its own step in order to be generalized to anything that the user wants to run?
Re:Firefox Picture-in-Picture by dylan604 on Wednesday July 08, 2020 @06:42PM (#23775014)
if it's not always on top, why break it out of the browser window at all? maybe i just haven't used it enough for your request to become apparent to me, but it seems counter intuitive on first thought.
Re:Firefox Picture-in-Picture by MasterYoda on Thursday July 09, 2020 @03:39AM (#23777859)
I really like Firefox PIP, but it's not perfect yet. I have missed the "timeline" so it would be easy to jump back if I wanted to re-watch the last bit. But I have noticed now that if the PIP window is active the arrow keys works for that which is great and it's also possible change volume with up/down arrow. So what a most miss now is that the PIP window remember its size and position from last time. Right now (on youtube) different resolutions gives different window sizes.
Re:Firefox Picture-in-Picture by philliphaydon on Wednesday July 08, 2020 @12:55PM (#23771737)
I wish I could get subtitle support on Netflix. Their app doesn't allow you to resize when its as always on top. PiP allows me to position it where and how I want, but lacks subtitles :(
Re:Firefox Picture-in-Picture by asdff on Wednesday July 08, 2020 @01:02PM (#23771815)
IIRC there was a firefox extention that popped out anything into a browser window with a simple header. You'd have a quarter inch of header, but it would be like a poor mans PiP and you'd end up with more controls at your disposal than the native firefox solution.
Re:Firefox Picture-in-Picture by ashconnor on Wednesday July 08, 2020 @12:30PM (#23771464)
It works better than the native support on OSX. A lot of videos I watch on Safari don't show the PIP button but work fine on Firefox.
Re:Firefox Picture-in-Picture by mikewhy on Wednesday July 08, 2020 @12:33PM (#23771496)
In Safari, you can right-click the speaker icon in the tab or address bar, and there's a PIP option in the menu.

Not as accessible as Firefox for sure.

Re:Firefox Picture-in-Picture by cstuder on Thursday July 09, 2020 @03:03PM (#23783773)
Well, that's exceptionally well hidden. Thank you for the tip.
Re:Firefox Picture-in-Picture by mthoms on Wednesday July 08, 2020 @03:44PM (#23773510)
Good to know, thanks. I suspect right click doesn't work when there's a transparent div over the video.
Re:Firefox Picture-in-Picture by mikewhy on Friday July 10, 2020 @12:44PM (#23793391)
Luckily this is all in the browser's UI, nothing a webpage can do to block that.
Re:Firefox Picture-in-Picture by iaml on Thursday July 09, 2020 @01:19AM (#23777157)
The actual pip window in firefox is not native and as such 1) doesn't support spaces that well 2) does not support minimizing 3) looks worse
Re:Firefox Picture-in-Picture by harshalizee on Wednesday July 08, 2020 @03:50PM (#23773556)
A long time ago, I wrote the PIP feature for browsers on the very first version of Android based Smart TVs (Phillips TVs). It used Mozilla's Gecko NPAPI plugin ( their version of WebKit) and built on top of Opera, the only one at the time that would support funnelling broadcast TV data at the time. It was pretty challenging, but still way more easier than trying to build with Safari, chrome. I always wondered why this feature never really became mainstream until now.
Re:Firefox Picture-in-Picture by zozos on Wednesday July 08, 2020 @12:02PM (#23771180)
Same. It's great.