aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/views/nodes/RecordingBox/RecordingView.tsx23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/client/views/nodes/RecordingBox/RecordingView.tsx b/src/client/views/nodes/RecordingBox/RecordingView.tsx
index 208eaf45a..380ac050d 100644
--- a/src/client/views/nodes/RecordingBox/RecordingView.tsx
+++ b/src/client/views/nodes/RecordingBox/RecordingView.tsx
@@ -164,29 +164,22 @@ export function RecordingView(props: IRecordingViewProps) {
}
- const finish = (e: React.PointerEvent) => {
- e.stopPropagation();
- console.log('finish', videoRecorder.current)
- // if inactive, then we're done recording all the segments
- if (videoRecorder.current && videoRecorder.current.state !== "inactive") {
- console.log('stopping recorder', videoRecorder.current?.state)
-
-
-
- // call stop on the video recorder
- videoRecorder.current?.stop();
+ // if this is called, then we're done recording all the segments
+ const finish = (e: React.PointerEvent) => {
+ e.stopPropagation();
+
+ // call stop on the video recorder if active
+ videoRecorder.current?.state !== "inactive" && videoRecorder.current?.stop();
// end the streams (audio/video) to remove recording icon
const stream = videoElementRef.current!.srcObject;
stream instanceof MediaStream && stream.getTracks().forEach(track => track.stop());
- // clear the recoringApi - this is done in the stop method
- // RecordingApi.Instance.clear();
+ // clear the recoringApi
+ RecordingApi.Instance.clear();
// this will call upon progessbar to update videos to be in the correct order
- console.log('setFinished to true', finished)
setFinished(true);
- }
}
const pause = (e: React.PointerEvent) => {