Closed cwaldau closed 9 years ago
Killing it dude. Thanks!
nice man, just pushed 4.32
On Wed, Sep 30, 2015 at 8:37 PM Christopher Waldau notifications@github.com wrote:
works on embedded players (when they are in their own tab) and the actual apple music page
— Reply to this email directly or view it on GitHub https://github.com/msfeldstein/chrome-media-keys/pull/76#issuecomment-144611703 .
Fun! Is there a way to support embedded players? Say example.com posts a bunch of articles, each one containing an embedded player of either soundcloud, apple music, spotify etc.
I have some ideas for this. I'm thinking for any site that doesn't have a corresponding controller, we can check for a series of query selectors, for example youtube would probably have .youtube-embed-player or something, and inject the appropriate controller (probably a separate controller for each sites embeds) that way.
See here: https://github.com/msfeldstein/chrome-media-keys/issues/40 #40
On Wed, Sep 30, 2015 at 8:47 PM Christopher Waldau notifications@github.com wrote:
Fun! Is there a way to support embedded players? Say example.com posts a bunch of articles, each one containing an embedded player of either soundcloud, apple music, spotify etc.
— Reply to this email directly or view it on GitHub https://github.com/msfeldstein/chrome-media-keys/pull/76#issuecomment-144612704 .
Hmm I was thinking to still have a controller for a site where it would list the commonly used embedded players for that site and link to those players appropriate controller. So example.com would have a controller that says it embeds soundcloud and spotify, and could either make the association to the already existing soundcloud/spotify controllers (if they are compatible) or link to a soundcloud/spotify embed controller.
Controllers for sites could also be dual purposed, the way I did with the apple music one. Looks for one element, if not present looks for the other.
Technically right now the one apple music controller would work on an embedded player, if we were able to detect it existed on the page.
Also the idea to still have a controller for example.com even though it only embeds music means the addon isn't scanning every single page a user visits.
I think we'd miss out on the long tail of sites doing it that way. We'd need to list every single site that embeds a youtube video, wheras if we sniff every page we can tell when it's happened.
On Wed, Sep 30, 2015 at 8:58 PM Christopher Waldau notifications@github.com wrote:
Hmm I was thinking to still have a controller for a site where it would list the commonly used embedded players for that site and link to those players appropriate controller. So example.com would have a controller that says it embeds soundcloud and spotify, and could either make the association to the already existing soundcloud/spotify controllers (if they are compatible) or link to a soundcloud/spotify embed controller.
Controllers for sites could also be dual purposed, the way I did with the apple music one. Looks for one element, if not present looks for the other.
Technically right now the one apple music controller would work on an embedded player, if we were able to detect it existed on the page.
Also the idea to still have a controller for example.com even though it only embeds music means the addon isn't scanning every single page a user visits.
— Reply to this email directly or view it on GitHub https://github.com/msfeldstein/chrome-media-keys/pull/76#issuecomment-144613807 .
Oh wait I get it, a site would still have to be added to the mappings, and it can be linked to some general controller that checks to see which embedded player is present on the page and links to its embed controller.
(wrote that before seeing your response)
But yeah I agree it would mean a lot more manual work to keep the list of supported sites (not embedded sites but sites that embed) maintained. I guess so long as the addon still runs smoothly while sniffing all pages it's all good.
works on embedded players (when they are in their own tab) and the actual apple music page