Skip to content

Commit

Permalink
music.youtube.com fix
Browse files Browse the repository at this point in the history
Update the docs
  • Loading branch information
lt-mayonesa committed Mar 30, 2019
1 parent 7d8464d commit 40216ca
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ Implements the MPRIS2 interface for Chrome and Firefox.
Currently, all sites should be supported with reduced capabilities (play, pause, stop, volume, seek, cover art).

And the following sites are supported with almost all of the capabilities MPRIS2 allows:
* [YouTube](https://youtube.com)
* [SoundCloud](https://soundcloud.com)
* [Netflix](https://netflix.com)
* [YouTube](https://lt-mayonesa.github.io/browser-mpris2/manual/youtube.html)
* [YouTube Music](https://lt-mayonesa.github.io/browser-mpris2/manual/youtube-music.html)
* [SoundCloud](https://lt-mayonesa.github.io/browser-mpris2/manual/soundcloud.html)
* [Netflix](https://lt-mayonesa.github.io/browser-mpris2/manual/netflix.html)

Pull requests are welcome.

Expand Down Expand Up @@ -51,7 +52,7 @@ If on GNOME or similar you should be able to take advantage of your new powers i
A port of this extension to Tampermonkey/Greasemonkey (and WebSockets).

## TODO
- Tests `brach: feature/tests-titb` (i started playing with a custom made testin framework, probably moving them to jest due to time, which is money)
- Tests per provider
- Compile `branch: feature/closure-compile` make travis-ci compile the js to dist/
- Providers:
- Amazon Music
4 changes: 2 additions & 2 deletions manual/how_to.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Create a .js file inside src/providers/ with then name (kebab-cased) of the site

## 2. Update manifest.json
Edit the [manifes.json](https://github.com/Lt-Mayonesa/browser-mpris2/blob/master/manifest.json), by adding an item to the `"content_scripts"` array.
1. the item's `"js"` property should contain file you created in the previous step
2. the item's `"matches"` property should contain a valid match for the site
1. the item's `"js"` property should contain the path to the file you created in the previous step
2. the item's `"matches"` property should contain a valid match for the site. See [content_scripts](https://developer.chrome.com/extensions/content_scripts) for more info.
3. ie:
```json
{
Expand Down
2 changes: 1 addition & 1 deletion manual/netflix.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Netflix Provider
This works on Netflix's site when watching a show (aka: netflix.com/watch)
This works on [Netflix](https://netflix.com) site when watching a show (aka: netflix.com/watch)

Besides the defaults ones, this provider adds the following features.

Expand Down
2 changes: 1 addition & 1 deletion manual/soundcloud.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Soundcloud Provider
This works on soundclouds's site.
This works on [soundcloud](https://soundcloud.com/) site.

Besides the defaults ones, this provider adds the following features.

Expand Down
2 changes: 1 addition & 1 deletion manual/youtube-music.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# YouTube Music Provider
This works on music.youtube.com.
This works on [YouTube Music](https://music.youtube.com/)

Besides the defaults ones, this provider adds the following features.

Expand Down
2 changes: 1 addition & 1 deletion manual/youtube.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# YouTube Provider
This works on youtube's main site and also on all embedded videos.
This works on [youtube's](https://www.youtube.com/) main site and also on all embedded videos.

Besides the defaults ones, this provider adds the following features.

Expand Down
2 changes: 1 addition & 1 deletion src/providers/youtube-music.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class YouTubeMusicPlayer extends Player {
* @returns {string}
*/
getCover () {
let img = document.querySelector('#thumbnail img.yt-img-shadow');
let img = document.querySelector('.image.ytmusic-player-bar');
return (img && img.getAttribute('src')) || super.getCover();
}
}
Expand Down

0 comments on commit 40216ca

Please sign in to comment.