code: def on_click(self, event):
          
          index = event["index"]
          button = event["button"]
  
          if index not in self._control_states.keys():
              if button == self.button_toggle:
                  index = "toggle"
              elif button == self.button_stop:
                  index = "stop"
              elif button == self.button_next:
                  index = "next"
              elif button == self.button_previous:
                  index = "previous"
              else:
                  return
          elif button != 1:
              return
  
          try:
              control_state = self._control_states.get(index)
              if self._player and self._get_button_state(control_state):
                  getattr(self._player, self._control_states[index]["action"])()
          except GError as err:
              self.py3.log(str(err).split(":", 1)[-1])
docs: Handles click events