Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Chrome extensions to add YouTube player controls to Linux desktops

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to use the Chrome extension to add YouTube player controls to the Linux desktop, the article is very detailed, has a certain reference value, interested friends must read it!

One Unity feature I miss (though only for a short time) is that the player control automatically appears in the Ubuntu sound indicator when you visit a website such as YouTube in a Web browser, so you can pause or stop video directly from the top bar, as well as browse video / song messages and previews.

This Unity feature has been gone for a long time, but I was looking for something similar for Gnome Shell, and then I came across browser-mpris2, an extension that implements the MPRIS v2 interface for Google Chrome/Chromium and currently only supports YouTube, which I think some readers might like.

The extension also applies to Chromium-based Web browsers such as Opera and Vivaldi.

Browser-mpris2 also supports Firefox, but because loading extensions through about:debugging is temporary, which is required by browser-mpris2, this article does not include guidance for Firefox. The developer intends to submit the extension to the Firefox plug-in website in the future.

Using this Chrome extension, you can get YouTube media player controls (play, pause, stop, and find) in applets that supports MPRIS2

). For example, if you use Gnome Shell, you can use the YouTube Media player control as a display control, or you can use an extension such as Media Player Indicator to do this. In Cinnamon / Linux Mint with Cinnamon, it appears in the sound Applet.

I can't use it on Unity. I don't know why. I didn't try this extension with other MPRIS2-enabled applet in different desktop environments (KDE, Xfce, MATE, etc.). If you have tried, please let us know if it applies to your desktop environment / applet that supports MPRIS2.

The following is a screenshot of the media player indicator that uses Gnome Shell's Ubuntu 18.04 and has a Chromium browser, showing information about the currently playing YouTube video and its controls (play / pause, stop and find):

Use a screenshot of its default sound applet and Chromium browser in Linux Mint 19 Cinnamon:

How to install browser-mpris2 for Google Chrom/Chromium

1. Install Git if you haven't already installed it

In Debian/Ubuntu/Linux Mint, use this command to install git:

Sudo apt install git

2. Download and install the files required by browser-mpris2.

The following command clones browser-mpris2 's Git repository and installs chrome-mpris2 to / usr/local/bin/ (run git clone in a place where you can save the browser-mpris2 folder. Command, because it will be used by Chrome/Chromium, you cannot delete it):

Git clone https://github.com/otommod/browser-mpris2sudo install browser-mpris2/native/chrome-mpris2 / usr/local/bin/

3. Load this extension in a Chrome/Chromium-based Web browser.

Open a Google Chrome, Chromium, Opera or Vivaldi browser, go to the Extensions page (type chrome://extensions in the URL bar), and switch to developer mode in the upper right corner of the screen. Then select "Load Unpacked" and select the chrome-mpris2 directory (make sure no subfolders are selected).

Copy the extension ID and save it, because you need it later (it looks like this: emngjajgcmeiligomkgpngljimglhhii, but it will be different from yours, so be sure to use the ID on your computer! ).

4. Run install-chrome.py (in the browser-mpris2/native folder) and specify the extended id and chrome-mpris2 paths.

Use this command in the terminal (replace REPLACE-THIS-WITH-EXTENSION-ID with the browser-mpris2 extension ID shown under chrome://extensions in the previous step) to install this extension:

Browser-mpris2/native/install-chrome.py REPLACE-THIS-WITH-EXTENSION-ID / usr/local/bin/chrome-mpris2

You only need to run this command once and you don't need to add it to startup or something like that. Any YouTube videos you play in Google Chrome or Chromium browsers should be displayed in any MPRISv2 applet you are using. You don't need to restart your Web browser.

The above is all the content of the article "how to use the Chrome extension to add YouTube player controls to the Linux desktop". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report