code: def toggle_play_pause(self):
          
          # Use Play/Pause button only for sources which support NETAUDIO
          if (self._state == STATE_PLAYING and
                  self._input_func in self._netaudio_func_list):
              return self._pause()
          elif self._input_func in self._netaudio_func_list:
              return self._play()
docs: Toggle play pause media player.