msfeldstein / chrome-media-keys

Chrome extension that adds media keys to most web music players
GNU Affero General Public License v3.0
89 stars 33 forks source link

Does not recognize new Pandora website #101

Closed kevindb closed 7 years ago

kevindb commented 7 years ago

The Media Keys Chrome extension doesn't seem to work with the 'new web experience' Pandora website (yay, repeat and unlimited skips!). It doesn't even think that anything's playing. With the drastic changes Pandora made, that's not unexpected. I just wanted to let you know.

Getting to the new website is very non-obvious. Here are the steps:

  1. Click your email in the upper right corner.
  2. Choose 'Settings,' and then 'Account.'
  3. Click on 'Go to New Site' in the very bottom left corner of the page.

If there's anything else I can do to help, such as providing logs or testing, just let me know. Thank you for a wonderful extension!

Ustice commented 7 years ago

Perhaps the BasicController can be altered to allow for versioned templates.

controller = new BasicController({
  versions: [{
    test: function () {} // returns truthy if this version of the page should be used
    settings: {
      // current settings
    }
  }]
});

In order to insure backward compatibility, and to keep templates as simple as possible, we can test in the controller if this.versions exists, and if so use that, and if not use the current template scheme.

msfeldstein commented 7 years ago

Yeah i think there's definitely some solution along these lines, the hacks i've been using are... not dope. PRs welcome!

On Thu, Dec 1, 2016 at 10:42 AM Jason Kleinberg notifications@github.com wrote:

Perhaps the BasicController can be altered to allow for versioned templates.

controller = new BasicController({ versions: [{ test: function () {} // returns truthy if this version of the page should be used settings: { // current settings } }] });

In order to insure backward compatibility, and to keep templates as simple as possible, we can test in the controller if this.versions exists, and if so use that, and if not use the current template scheme.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/msfeldstein/chrome-media-keys/issues/101#issuecomment-264256634, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJ1b35_GZmY4aHxHxB4IO-LRriE0cAMks5rDxUZgaJpZM4LBc1- .

Ustice commented 7 years ago

@msfeldstein Check out this branch. I converted it to ES6 standards and added a partial config for the new Pandora. It is working for the old site just fine, but I am having a hard time getting the script to fire on the new site.

It loads the controller properly, as I can see it getting all the way to the end of init, but it isn't doing anything beyond that point. I have only really been looking deeply at this code for a little bit, so I am still not sure what is going on, but I figured that maybe you would have a better idea.

msfeldstein commented 7 years ago

It looks like there's something wrong with the 'this' binding in the isPlaying methods with the new es6 stuff. You'll notice if you print out this.pauseSelector from inside the PandoraController.isPlaying() closure it's undefined (and this points to the global window object). You'll need to fix the binding there, or even easier just hardcode the string inside the callbacks instead of looking up this.pauseSelector

On Thu, Dec 1, 2016 at 10:56 PM Jason Kleinberg notifications@github.com wrote:

@msfeldstein https://github.com/msfeldstein Check out this branch https://github.com/Ustice/chrome-media-keys/tree/feature/ustice/161202/new-pandora. I converted it to ES6 standards and added a partial config for the new Pandora. It is working for the old site just fine, but I am having a hard time getting the script to fire on the new site.

It loads the controller properly, as I can see it getting all the way to the end of init, but it isn't doing anything beyond that point. I have only really been looking deeply at this code for a little bit, so I am still not sure what is going on, but I figured that maybe you would have a better idea.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/msfeldstein/chrome-media-keys/issues/101#issuecomment-264387185, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJ1bxvgSzapPKLfgaWgvD0VyRrOtV1_ks5rD8EEgaJpZM4LBc1- .

Ustice commented 7 years ago

103 is now complete, and ready for review.

kevindb commented 7 years ago

New version 4.52 is working great with the new Pandora site. I realized that I must've downloaded the extension before you moved to a paid model. I just bought the $1.99 to help support continued development. Thank you for a wonderful extension!!