sound-redux icon indicating copy to clipboard operation
sound-redux copied to clipboard

add arrow keys for next and previous track

Open ghondar opened this issue 10 years ago • 10 comments

I feel that it is more intuitive to use the right and left arrows to change the music, are mostly used in the majority of players.

I was watching that using keypress and therefore cannot capture the arrows key events. I see that you use keypress instead of keydown therefore can not capture the events of the arrows.

Another solution would be to use mousetrap for keyboard events, being a way to capture more easy to maintain in the development, just add 2kbs to the project

ghondar avatar Nov 19 '15 16:11 ghondar

Makes sense :+1: Although I would prefer just using keydown instead of bringing in another library.

andrewngu avatar Nov 19 '15 18:11 andrewngu

OK, I already have a pr by adding arrows events using keydown, also i added notifications to deezer style, in case you're in another tab. Notification

ghondar avatar Nov 20 '15 16:11 ghondar

Cool, but I'd prefer to have the notifications be a setting that users opt into. It'd be annoying if I suddenly started getting notifications without an explanation. What do you think?

andrewngu avatar Nov 20 '15 16:11 andrewngu

of course, the first time load you page, ask if you want to receive notifications

ghondar avatar Nov 20 '15 16:11 ghondar

Google will manage notifications

Notification Manager

ghondar avatar Nov 20 '15 17:11 ghondar

Sounds good. I just remember turning on notifications for a website one time, not knowing exactly what would happen (new news articles) and got super annoyed. Is it possible to describe exactly what the notifications will do when asking for permission?

andrewngu avatar Nov 20 '15 17:11 andrewngu

I think that it's not possible,When you run Notification.requestPermission, it only shows a popup saying: "https://soundredux.io" wants to show notifications -> Block or Allow. requestPermission request

ghondar avatar Nov 20 '15 18:11 ghondar

What a few sites do, when they want to enable notifications, is have an "Enable notifications" checkbox/button underneath a paragraph or two explaining exactly what and why, in some kind of settings area.

It gives them an easy way to turn them on and off, and lets them know what it'll do.

wub avatar Dec 06 '15 22:12 wub

Also, for those who don't know - shift + / shift + will go back and forth between songs, just like SoundCloud!

wub avatar Dec 06 '15 22:12 wub

@andrewngu Should this be closed now?

wub avatar Aug 31 '16 21:08 wub