Hacker News new | ask | show | jobs
by elwell 774 days ago
I guess the interesting thing here is that it's being simply handled by JS:

    navigator.mediaSession.setActionHandler('pause', () => {
      press('.')
    })
    navigator.mediaSession.setActionHandler('nexttrack', () => {
      press('-')
    })
    navigator.mediaSession.setActionHandler('previoustrack', () => {
      inputCodes = ''
      showInput()
      say('backspace')
      clearTimeout(timerId)
      txtOutput.value = txtOutput.value.slice(0, -1)
    })