code: 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();
      }
    }
docs: Tell camera and tracked controls motion-capture-recorder components to stop recording.
  Store recording and replay if autoPlay is on.