Open arjittw opened 3 months ago
Thanks for the suggestion! Seems like a great addition. If anyone is interested in taking on development of this feature, feel free to comment!
I think adding this to manifest
"commands": {
"play-pause": {
"suggested_key": {
"default": "Ctrl+Shift+Space"
},
"description": "Play/Pause"
},
"next": {
"suggested_key": {
"default": "Ctrl+Shift+Right"
},
"description": "Next"
},
"previous": {
"suggested_key": {
"default": "Ctrl+Shift+Left"
},
"description": "Previous"
}
}
and adding this should work
chrome.commands.onCommand.addListener(command => {
switch (command) {
case 'play-pause':
sendToContent({
name: MusicControllerMessage.PLAY_PAUSE
})
break;
case 'next':
sendToContent({
name: MusicControllerMessage.NEXT
})
break;
case 'previous':
sendToContent({
name: MusicControllerMessage.PREVIOUS
})
break;
}
});
That seems like a reasonable quick solution! Do you want to give it a try and send a PR? We'd also want to have a button on the settings page that sends the user to the extension configuration page where those key controls can be configured.
Like this extension but built in
Hotkeys that can be customized in browser settings that will allow to easily play/pause and next/prev track