when the play state changes
485885
function onPlayChange() {
		if (paused !== media.paused) {
			paused = media.paused;

			$(self.play, { 'aria-label': paused ? lang.play || 'play' : lang.pause || 'pause' });
			$(self.playSymbol, { 'aria-hidden': !paused });
			$(self.pauseSymbol, { 'aria-hidden': paused });

			clearInterval(interval);

			if (!paused) {
				// listen for time changes every 30th of a second
				interval = setInterval(onTimeChange, 34);
			}

			// dispatch new "playchange" event
			dispatchCustomEvent(media, 'playchange');
		}
	}
552702
private void initPlaybackStateBuilder() {
        mStateBuilder = new PlaybackStateCompat.Builder();
        mStateBuilder.setActions(
                PlaybackStateCompat.ACTION_PLAY
                        | PlaybackStateCompat.ACTION_PAUSE
                        | PlaybackStateCompat.ACTION_PLAY_PAUSE
                        | PlaybackStateCompat.ACTION_SKIP_TO_NEXT
                        | PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS
        );
    }
866262
protected void activeStatusChanged(boolean newActiveState) throws PushStateException {
      active = newActiveState;
      log.debugf("changed mode %s", this);
      if (active && singletonConfiguration.pushStateWhenCoordinator())
         doPushState();
   }
904004
public synchronized void clearPlaybackState(int player) {
        PlaybackState oldFurthestState = getFurthestPlaybackState();
        PlaybackState oldState = playbackStateMap.remove(player);
        repaintDueToPlaybackStateChange(oldState, null, oldFurthestState);
    }
1121878
function handleStateChange( newShowContent ) {
               if( showContent === newShowContent ) {
                  return;
               }
               if( newShowContent ) {
                  if( showContent === undefined ) {
                     // initial show: no animations
                     jqElement.show();
                  }
                  else {
                     show();
                     if( options.animationsEnabled && widgetIsVisible ) {
                        startWatchingForContentResizing();
                     }
                  }
               }
               else {
                  hide();
                  stopWatchingForContentResizing();
               }
               showContent = newShowContent;
            }
23453
def play(self):
        """"""
        if self.state == STATE_PAUSED:
            self._player.set_state(Gst.State.PLAYING)
            self.state = STATE_PLAYING
363687
def OnTogglePlay(self, event):
        """"""

        if self.player.get_state() == vlc.State.Playing:
            self.player.pause()
        else:
            self.player.play()

        event.Skip()
884565
def state(self, state):
        ''''''
        logger.debug('client changing to state=%s', ClientState.Names[state])
        self._state = state
1211857
private PlayState3 findPlayState3() {
        PlayState3 result = PLAY_STATE_3_MAP.get(packetBytes[157]);
        if (result == null) {
            return PlayState3.UNKNOWN;
        }
        return result;
    }
31279
function(frame) {
                if (this.status != "playing") {
                    return;
                }
                this.time += frame.dur;
                this.setValue(this.getValue());
                if (this.time >= this.duration) {
                    this.timeUp();
                }
                frame.next();
            }
45553
def pause(self):
        """"""
        if self.state == STATE_PLAYING:
            self._player.set_state(Gst.State.PAUSED)
            self.state = STATE_PAUSED
23362
@Override
  @SuppressWarnings("unchecked")
  public void stateChanged(Enum oldState, Enum newState) {
    logger.info("Diameter ACC SessionFactory :: stateChanged :: oldState[{}], newState[{}]", oldState, newState);
  }
612702
private PlayState1 findPlayState1() {
        PlayState1 result = PLAY_STATE_1_MAP.get(packetBytes[123]);
        if (result == null) {
            return PlayState1.UNKNOWN;
        }
        return result;
    }
127498
def add_play(self, choice, count=1):
        """"""
        self.redis.hincrby(EXPERIMENT_REDIS_KEY_TEMPLATE % self.name, "%s:plays" % choice, count)
        self._choices = None
124588
async def set_playstate(self, state, pos=0):
        
        url = '{}/Sessions/{}/Playing/{}'.format(
            self.server.construct_url(API_URL), self.session_id, state)
        params = {'api_key': self.server.api_key}

        if state == 'seek':
            params['SeekPositionTicks'] = int(pos * 10000000)
            params['static'] = 'true'

        _LOGGER.debug('Playstate URL: %s', url)

        post = await self.server.api_post(url, params)
        if post is None:
            _LOGGER.debug('Error sending command.')
        else:
            _LOGGER.debug('Post response: %s', post)
533415
function() {
  this.lastTime = 0;

  // Setup our different game components.
  this.audio = new Sound();
  this.player = new Player(10, 26, Math.PI * 1.9, 2.5);
  this.controls = new Controls();
  this.map = new Map(25);
  this.camera = new Camera(isMobile ? 256 : 512);
  
  requestAnimationFrame(this.tick.bind(this));
}
471787
private void onStateChange(Session.State state) {
    switch (state) {
      // When the session is opened, transition the state to CONNECTED.
      case OPEN:
        setState(State.CONNECTED);
        break;
      // When the session becomes unstable, transition the state to SUSPENDED.
      case UNSTABLE:
        setState(State.SUSPENDED);
        break;
      case STALE:
        setState(State.SUSPENDED);
        this.close();
        break;
      // When the session is expired, transition the state to SUSPENDED if necessary. The recovery strategy
      // must determine whether to attempt to recover the client.
      case EXPIRED:
        setState(State.SUSPENDED);
        recoveryStrategy.recover(this);
        break;
      case CLOSED:
        setState(State.CLOSED);
        break;
      default:
        break;
    }
  }