From 98fba8bdb0fe81d6f71d0ae6018fcaaf7d8897df Mon Sep 17 00:00:00 2001
From: Michael Foiani <sotech117@michaels-mbp-5.devices.brown.edu>
Date: Wed, 15 Jun 2022 15:39:55 -0400
Subject: Refactor RecordingApi into two main files - TrackMovements and
 ReplayMovements. TrackMovements is for recording presentations and
 ReplayMovments is for replaying them.

---
 src/client/views/nodes/RecordingBox/RecordingView.tsx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'src/client/views/nodes/RecordingBox/RecordingView.tsx')

diff --git a/src/client/views/nodes/RecordingBox/RecordingView.tsx b/src/client/views/nodes/RecordingBox/RecordingView.tsx
index ec9838bdd..83ed6914e 100644
--- a/src/client/views/nodes/RecordingBox/RecordingView.tsx
+++ b/src/client/views/nodes/RecordingBox/RecordingView.tsx
@@ -8,7 +8,7 @@ import { IconContext } from "react-icons";
 import { Networking } from '../../../Network';
 import { Upload } from '../../../../server/SharedMediaTypes';
 import { returnFalse, returnTrue, setupMoveUpEvents } from '../../../../Utils';
-import { Presentation, RecordingApi } from '../../../util/RecordingApi';
+import { Presentation, TrackMovements } from '../../../util/TrackMovements';
 
 export interface MediaSegment {
     videoChunks: any[],
@@ -64,7 +64,7 @@ export function RecordingView(props: IRecordingViewProps) {
     useEffect(() => {
         if (finished) {
             // make the total presentation that'll match the concatted video
-            let concatPres = trackScreen && RecordingApi.Instance.concatPresentations(videos.map(v => v.presentation as Presentation));
+            let concatPres = trackScreen && TrackMovements.Instance.concatPresentations(videos.map(v => v.presentation as Presentation));
 
             // this async function uses the server to create the concatted video and then sets the result to it's accessPaths
             (async () => {
@@ -135,7 +135,7 @@ export function RecordingView(props: IRecordingViewProps) {
         videoRecorder.current.onstart = (event: any) => {
             setRecording(true);
             // start the recording api when the video recorder starts
-            trackScreen && RecordingApi.Instance.start();
+            trackScreen && TrackMovements.Instance.start();
         };
 
         videoRecorder.current.onstop = () => {
@@ -149,7 +149,7 @@ export function RecordingView(props: IRecordingViewProps) {
                 };
 
                 // depending on if a presenation exists, add it to the video
-                const presentation = RecordingApi.Instance.yieldPresentation();
+                const presentation = TrackMovements.Instance.yieldPresentation();
                 setVideos(videos => [...videos, (presentation != null && trackScreen) ? { ...nextVideo, presentation } : nextVideo]);
             }
 
@@ -174,7 +174,7 @@ export function RecordingView(props: IRecordingViewProps) {
         stream instanceof MediaStream && stream.getTracks().forEach(track => track.stop());
 
         // finish/clear the recoringApi
-        RecordingApi.Instance.finish();
+        TrackMovements.Instance.finish();
 
         // this will call upon progessbar to update videos to be in the correct order
         setFinished(true);
-- 
cgit v1.2.3-70-g09d2

