Thann / play-with-mpv

Chrome extension that allows you to play videos in webpages like youtube with MPV instead
https://chrome.google.com/webstore/detail/play-with-mpv/hahklcmnfgffdlchjigehabfbiigleji
The Unlicense
352 stars 81 forks source link

A new approach (MPV profiles) #104

Open APT37 opened 2 weeks ago

APT37 commented 2 weeks ago

This does not concern peerflix or mkchromecast users. If you're using those, you can stop reading now.

The idea is to minimize what the extension and shim (server) have to do by using MPV profiles. This would not only drastically minimize maintenance, but also increase safety and stability to a maximum.

Configuration

  1. MPV: Set up your MPV profile/s. This is where the actual of the configuration happens.
  2. Shim: Set host:port via command line option or environment variable.
  3. Extension: Paste the shim's URL, add your profile name/s.

Flow

  1. User clicks button.
  2. Extension sends profile name and target URL to shim.
  3. Shim executes mpv --profile {name} {URL}.
  4. MPV does what it's supposed to.

I'm interested in any thoughts on this idea.

NOTE: This is not a duplicate of https://github.com/Thann/play-with-mpv/issues/94, because only supporting MPV profiles is not enough in my opinion.