Open ghost opened 4 years ago
Hello!
First of all, I've slightly changed Connector API, so now you just need to declare playerSelector
like this.
but I don't know how to write the observer
Any element that includes all other elements, changes of which matter, will work (e.g. body
will always work), but is's better to choose the deepest one of such elements because it leads to better performance.
There's also already implemented connector for different extension. You might want to look here for implementation details.
Feel free to ping me if you need more help.
I can't make wmc-mpris work with my setup. this is my ~/.mozilla/native-messaging-hosts/me.f1u77y.web_media_controller.firefox.json
{
"name": "treeshateorcs.web_media_controller",
"description": "Allows controlling VK player via MPRIS",
"path": "/usr/bin/web-media-controller",
"type": "stdio",
"allowed_extensions": [
"web-media-controller@treeshateorcs"
]
}
and firefox_manifest.json
{
"applications": {
"gecko": {
"id": "web-media-controller@treeshateorcs",
"strict_min_version": "48.0"
}
},
"options_ui.browser_style": true
}
however on addons.mozilla.org it still lists my extension as web-media-controller@bobross.com
If your extension is listed as web-media-controller@bobross.com
, you should use the same ID in native messaging host manifest. If you want to change it, you could submit a new add-on with different ID.
I started implementing it based on the soundcloud connector, but I don't know how to write the observer