Fix mpris bugs - follows #480 #509

Merged
Araxeus merged 2 commits from mpris-urgent-fix into master 2021-12-10 20:14:31 +00:00
Araxeus commented 2021-12-03 14:00:50 +00:00 (Migrated from github.com)

I sadly couldn't test the changes on linux after the latest merge conflict solving on PR #480 since I use windows, and some stupid bugs made their way to the main branch because of that.

Thankfully @JoeJoeTV helped test mpris on linux once again, and all the little bugs have been fixed in this PR

Sorry about those!

-fix missing songControls (forgot to re-add it after moving the code from shortcuts/back.js to shortcuts/mpris.js 🤦🏼‍♂️)
-fix e.target instead of e.detail in apiLoaded event (to access the api)
-fix document.querySelector('video') being called before apiLoaded
-fix 'seeked' event listener
-setup timeChange Listener if on linux+shortcuts enabled

(I also added a sneaky change to the youtube-music.css that hides the chromecast button which doesn't work because electron doesn't support[1][2] the chrome.cast api)

I sadly couldn't test the changes on linux after the latest merge conflict solving on PR #480 since I use windows, and some stupid bugs made their way to the main branch because of that. Thankfully @JoeJoeTV helped test mpris on linux once again, and all the little bugs have been fixed in this PR Sorry about those! -fix missing songControls (forgot to re-add it after moving the code from `shortcuts/back.js` to `shortcuts/mpris.js` 🤦🏼‍♂️) -fix e.target instead of e.detail in apiLoaded event (to access the api) -fix document.querySelector('video') being called before apiLoaded -fix 'seeked' event listener -setup timeChange Listener if on linux+shortcuts enabled (I also added a sneaky change to the youtube-music.css that hides the chromecast button which doesn't work because electron doesn't support[[1](https://github.com/electron/electron/issues/869)][[2](https://github.com/electron/electron/issues/7024)] the `chrome.cast` api)
th-ch (Migrated from github.com) approved these changes 2021-12-10 20:14:25 +00:00
th-ch (Migrated from github.com) left a comment

Looks good, thanks for the improvements!

Looks good, thanks for the improvements! ✅
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: YTMD/youtube-music#509
No description provided.