Reputation: 11131
I am trying to detect the events from a blutooth media controller with Play/Pause buttons and volume up/down buttons. For volume up/down I catch 174 and 175 event keyCodes using keyup listener but for play/pause It not works. I found that the standard way is to use MediaSession Api (This doumentation).
Besides I found this website https://keycode.info/ which provides the event keyCodes for all input types. I checked the source code and found that it is not using MediaSession but catches play/pause events as well. It seems that only touchstart,onkeydown and onkeyup are being tracked but Play/Pause is being detected with keycode 179. Can anyone tell me how it works?
Upvotes: 1
Views: 106