So, I've recently gone back to linux, this time a Fedora instead of arch.

First thing I've noticed is, of course, youtube not working due to no flash and being forced to use the crappy html5 container in firefox or install chrome if I want to watch videos.

So, for a few days I've used the html5 player and it's horrible. or beyond horrible, can't decide yet..

Long story short, finally set up my firefox more or less how I want to, so here's my config.

The extension I'm using is Open With (https://addons.mozilla.org/en-US/firefox/addon/open-with/). I'm using this not only for youtube, but for anything with a video running in a flash container. Basically, go about:openwith once you install it and add

/usr/bin/mpv --force-window --ytdl

To make this work you will obviously need mpv and youtube-dl on your system. Set the options to display as menu item on view menu, main context menu and main context menu (links). You can now right-click youtube, twitch, etc links and open them directly in mpv. You can also browse to a twitch channel or youtube page or whatever ytdl supports and just click the mpv icon and it'll load the video.

Now on to embedding mpv instead of flash/html5 container. To do this I needed to install mozplugger and modify it a bit to use mpv instead of mplayer which is the default. think this is the only thing that needs to be changed:

/etc/mozpluggerrc
define(MP_CMD,[mpv -really-quiet --keep-open=yes $1 </dev/null])
define(MP_EMBED,[embed noisy ignore_errors: MP_CMD(--autofit=$width -wid $window $1)])
define(MP_NOEMBED,[noembed noisy ignore_errors maxaspect swallow(mpv): MP_CMD($1)])


Since I was editing mozpluggerrc I stumbled upon openoffice part and made it work with libre:

define([OO],[swallow(VCLSalFrame) fill: libreoffice --nologo --norestore --view $1 "$file"])

Next thing you need to embed your player of choice in firefox is to grab ViewTube (http://isebaro.com/viewtube/?ln=en). Note that you'll need greasemonkey for that. While viewtube is great it unfortunately doesn't support videos embeded on external sites, like ESR for example. That left me a bit disappointed, but I kept looking and seems the same author made the LinkTube extension which replaces all the embeded content on external sites with a link to the video. Unfortunately it makes for an ugly link, so I had to "trim" that script a bit. Here's the trimmed script which only displays the link and no other crap: http://pastie.org/9984555

This is where openwith extension comes in handy again, you can just right-click it and open in mpv and continue to browse with no hassle.

Anyway, hope you find it useful.