src/components/avatar-recorder.js
function () {
    var trackedControllerEls = this.trackedControllerEls;

    if (!this.isRecording) { return; }

    log('Stopped recording.');
    this.isRecording = false;
    this.cameraEl.components['motion-capture-recorder'].stopRecording();
    Object.keys(trackedControllerEls).forEach(function (id) {
      trackedControllerEls[id].components['motion-capture-recorder'].stopRecording();
    });
    this.recordingData = this.getJSONData();
    this.storeRecording(this.recordingData);

    if (this.data.autoPlay) {
      this.replayRecording();
    }
  }
function () {
    var trackedControllerEls = this.trackedControllerEls;

    if (!this.isRecording) { return; }

    log('Stopped recording.');
    this.isRecording = false;
    this.cameraEl.components['motion-capture-recorder'].stopRecording();
    Object.keys(trackedControllerEls).forEach(function (id) {
      trackedControllerEls[id].components['motion-capture-recorder'].stopRecording();
    });
    this.recordingData = this.getJSONData();
    this.storeRecording(this.recordingData);

    if (this.data.autoPlay) {
      this.replayRecording();
    }
  }
function ( ) { var trackedControllerEls = this . trackedControllerEls ; if ( ! this . isRecording ) { return ; } log ( 'Stopped recording.' ) ; this . isRecording = false ; this . cameraEl . components [ 'motion-capture-recorder' ] . stopRecording ( ) ; Object . keys ( trackedControllerEls ) . forEach ( function ( id ) { trackedControllerEls [ id ] . components [ 'motion-capture-recorder' ] . stopRecording ( ) ; } ) ; this . recordingData = this . getJSONData ( ) ; this . storeRecording ( this . recordingData ) ; if ( this . data . autoPlay ) { this . replayRecording ( ) ; } }
Tell camera and tracked controls motion-capture-recorder components to stop recording.
Store recording and replay if autoPlay is on.
Tell camera and tracked controls motion - capture - recorder components to stop recording . Store recording and replay if autoPlay is on .