GithubHelp home page GithubHelp logo

mathiasgilson / musiccontrollerchromeextension Goto Github PK

View Code? Open in Web Editor NEW
15.0 2.0 3.0 23 KB

Google Chrome extension to use keyboard media hot-keys โช โฏ โฉ to control your favorite music streaming service ๐ŸŽต without having to switch tab ๐Ÿ˜Ž

License: MIT License

JavaScript 71.97% CSS 13.95% HTML 14.08%
music-playback music-control chrome-extension spotify youtube youtube-music tidal deezer

musiccontrollerchromeextension's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

musiccontrollerchromeextension's Issues

master

 #1 @MathiasGilson 

1. [ ] 

- [```](`url`) 

1. > ### **__**

Option to disable hotkeys for specific sites

Hey,

it would be great if it would be possible to disable the hotkeys for specific sites or set a priority for sites.
For example, do I want to control Spotify, Deezer... while using Twitch but pausing it will end up pausing twitch.

Doesn't work on Brave Youtube PWA

The extension works on a Brave browser tab, but when youtube is opened as PWA, then it doesn't work with extension, but before extension play/pause worked.

Not working on external app

I'm using desktop version of youtube music on my mac and hotkeys are not working unless you are using hotkeys in main chrome window. Is there any way to fix this? Thank you

Different languages not working on Deezer

Good morning, I've just checked that extension was not working on Deezer; and just took a look at the code, and it is happening because the selector for getting buttons is using aria attribute, so it is not consistent between languages (if you have the browser in a language that is not English, aria-label will not be 'Next' and it will not work, for instance in Spanish it is 'Siguiente'):

"www.deezer.com": {
  buttonBased: true,
  next: `'.svg-icon-group-btn[aria-label="Next"]'`,
  prev: `'.svg-icon-group-btn[aria-label="Back"]'`,
  playPause: `'.svg-icon-group-btn[aria-label="Pause"], .svg-icon-group-btn[aria-label="Play"]'`,
}

As this selectors are being used directly to apply the click event; and there is no a 'parent selector' in JS, I can't get a clean direct solution to this because the 'back', 'play', 'next' classes are directly in the child svg item; and it is not clickable directly through click() method.
In a dirty way, maybe it could be fixed using this selectors, but I don't know if there could be any side effect (that empty svg-icon-group-item list items that deezer put there are really suspicious, but it seems that they are using it just for margin):

"www.deezer.com": {
  buttonBased: true,
  next: `'.svg-icon-group-item:nth-child(5) .svg-icon-group-btn'`,
  prev: `'.svg-icon-group-item:nth-child(1) .svg-icon-group-btn'`,
  playPause: `'.svg-icon-group-item:nth-child(3) .svg-icon-group-btn'`,
}

It should work with current Deezer HTML structure, and doesn't need to modify the JS working with diferent flows; working just like it is doing till now, but in every lang.

Thanks for your work! If I can help with something, let me know!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.