Change repeat mode of current player.
972580
def repeat(mode):
    """"""
    message = command(protobuf.CommandInfo_pb2.ChangeShuffleMode)
    send_command = message.inner()
    send_command.options.externalPlayerCommand = True
    send_command.options.repeatMode = mode
    return message
1012842
def play(self):
        """"""
        self._response['shouldEndSession'] = True
        self._response['action']['audio']['interface'] = 'play'
        self._response['action']['audio']['sources'] = []
        return self
529778
function onUserPlayerChange(data){

            var player = gameData.player;

            //Check if data contains different values
            if (player.get("angle") !== data.angle.toPrecision(1) || player.get("isAccelerating") !== data.isAccelerating){
                var buffer = micro.toBinary(data, "PlayerUpdate");
                socket.send(buffer);

                //Allow for latency before setting these changes on the player
                setTimeout(function(){
                    player.set(data);
                }, latency);
            }
        }
857608
def mode(data):
    
    c = Counter(data)
    mode, freq = c.most_common(1)[0]
    return mode
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();
            }
321983
function initReplay() {
  const replayOption = ['record', 'replay'].find(opt => program[opt] === true)
  if (replayOption) process.env.REPLAY = replayOption

  process.env.REPLAY =
    replayOption || (process.env.REPLAY ? process.env.REPLAY : 'bloody')

  if (process.env.REPLAY !== 'bloody') require('replay')
}
240677
function restartMediaPlayer () {
        exitingSeek = false;
        pauseOnExitSeek = false;
        var source = mediaPlayer.getSource();
        var mimeType = mediaPlayer.getMimeType();

        reset();
        mediaPlayer.initialiseMedia('video', source, mimeType, playbackElement, setSourceOpts);
        mediaPlayer.beginPlaybackFrom(currentTime + timeCorrection || 0);
      }
1267872
def updatePlayer(name, settings):
    """"""
    player = delPlayer(name) # remove the existing record
    _validate(settings)
    player.update(settings)
    player.save()
    getKnownPlayers()[player.name] = player
    return player
1012338
public void setRefreshFrequency(IntervalFrequency frequency) {
        if (NONE_REFRESH_INTERVAL == mRefreshInterval && IntervalFrequency.NONE != frequency) {
            // Install draw-frame listener if frequency is no longer NONE
            getGVRContext().unregisterDrawFrameListener(mFrameListener);
            getGVRContext().registerDrawFrameListener(mFrameListener);
        }
        switch (frequency) {
            case REALTIME:
                mRefreshInterval = REALTIME_REFRESH_INTERVAL;
                break;
            case HIGH:
                mRefreshInterval = HIGH_REFRESH_INTERVAL;
                break;
            case MEDIUM:
                mRefreshInterval = MEDIUM_REFRESH_INTERVAL;
                break;
            case LOW:
                mRefreshInterval = LOW_REFRESH_INTERVAL;
                break;
            case NONE:
                mRefreshInterval = NONE_REFRESH_INTERVAL;
                break;
            default:
                break;
        }
    }
1125554
def addPlayer(settings):
    """"""
    _validate(settings)
    player = PlayerRecord(settings)
    player.save()
    getKnownPlayers()[player.name] = player
    return player
1096004
private void setPlayable() {
		if (mPlayButton != null) {
			mPlayButton.setVisibility(View.VISIBLE);
		}

		if (mPauseButton != null) {
			mPauseButton.setVisibility(View.GONE);
		}
	}
384774
def setCurrentMode( self, mode ):
        
        if ( self._currentMode == mode ):
            return
        
        self._currentMode = mode
        self.updateModeSettings()
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');
		}
	}
994171
def OnAdjustVolume(self, event):
        """"""

        self.volume = self.player.audio_get_volume()

        if event.GetWheelRotation() < 0:
            self.volume = max(0, self.volume-10)
        elif event.GetWheelRotation() > 0:
            self.volume = min(200, self.volume+10)

        self.player.audio_set_volume(self.volume)
160839
def _goto_playing_station(self, changing_playlist=False):
        
        if (self.player.isPlaying() or self.operation_mode == PLAYLIST_MODE) and \
            (self.selection != self.playing or changing_playlist):
            if changing_playlist:
                self.startPos = 0
            max_lines = self.bodyMaxY - 2
            if logger.isEnabledFor(logging.INFO):
                logger.info('max_lines = {0}, self.playing = {1}'.format(max_lines, self.playing))
            if self.number_of_items < max_lines:
                self.startPos = 0
            elif self.playing < self.startPos or \
                    self.playing >= self.startPos + max_lines:
                if logger.isEnabledFor(logging.INFO):
                    logger.info('=== _goto:adjusting startPos')
                if self.playing < max_lines:
                    self.startPos = 0
                    if self.playing - int(max_lines/2) > 0:
                        self.startPos = self.playing - int(max_lines/2)
                elif self.playing > self.number_of_items - max_lines:
                    self.startPos = self.number_of_items - max_lines
                else:
                    self.startPos = int(self.playing+1/max_lines) - int(max_lines/2)
            if logger.isEnabledFor(logging.INFO):
                logger.info('===== _goto:startPos = {0}, changing_playlist = {1}'.format(self.startPos, changing_playlist))
            self.selection = self.playing
            self.refreshBody()
885725
def setCurrentMode( self, mode ):
        
        self.scene().setCurrentMode(mode)
        self.scene().setSceneRect(0, 0, self.width() - 5, self.height() - 5)
        if ( not self.signalsBlocked() ):
            self.currentModeChanged.emit(mode)
1069457
def set_allow_repeat_items(self, allow_repeat_items):
        """"""
        if self.get_allow_repeat_items_metadata().is_read_only():
            raise NoAccess()
        if not self.my_osid_object_form._is_valid_boolean(allow_repeat_items):
            raise InvalidArgument()
        self.my_osid_object_form._my_map['allowRepeatItems'] = allow_repeat_items