diff options
Diffstat (limited to 'src/client/views')
| -rw-r--r-- | src/client/views/Main.tsx | 6 | ||||
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 16 | ||||
| -rw-r--r-- | src/client/views/nodes/RecordingBox/RecordingBox.tsx | 2 | ||||
| -rw-r--r-- | src/client/views/nodes/RecordingBox/RecordingView.tsx | 10 | ||||
| -rw-r--r-- | src/client/views/nodes/VideoBox.tsx | 8 |
5 files changed, 16 insertions, 26 deletions
diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx index 517fe097c..c1b67ba19 100644 --- a/src/client/views/Main.tsx +++ b/src/client/views/Main.tsx @@ -8,7 +8,8 @@ import { AssignAllExtensions } from "../../extensions/General/Extensions"; import { Docs } from "../documents/Documents"; import { CurrentUserUtils } from "../util/CurrentUserUtils"; import { LinkManager } from "../util/LinkManager"; -import { RecordingApi } from "../util/RecordingApi"; +import { ReplayMovements } from '../util/ReplayMovements'; +import { TrackMovements } from "../util/TrackMovements"; import { CollectionView } from "./collections/CollectionView"; import { MainView } from "./MainView"; @@ -37,6 +38,7 @@ AssignAllExtensions(); const expires = "expires=" + d.toUTCString(); document.cookie = `loadtime=${loading};${expires};path=/`; new LinkManager(); - new RecordingApi; + new TrackMovements(); + new ReplayMovements(); ReactDOM.render(<MainView />, document.getElementById('root')); })();
\ No newline at end of file diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index 7db3b1482..a661cebb8 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -58,7 +58,7 @@ import React = require("react"); import { FieldView, FieldViewProps } from "../../nodes/FieldView"; import { InkTranscription } from "../../InkTranscription"; import e = require("connect-flash"); -import { RecordingApi } from "../../../util/RecordingApi"; +import { ReplayMovements } from "../../../util/ReplayMovements"; export const panZoomSchema = createSchema({ _panX: "number", @@ -1005,20 +1005,8 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection @action setPan(panX: number, panY: number, panTime: number = 0, clamp: boolean = false) { - // set the current respective FFview to the tab being panned. - // if (Doc.UserDoc()?.presentationMode === 'recording') { - // // RecordingApi.Instance.setRecordingFFView(this); - // console.log('setRecordingFFView', this); - // } - // TODO: make this based off the specific recording FFView - // (Doc.UserDoc()?.presentationMode === 'none' || Doc.UserDoc()?.presentationMode === 'watching') && RecordingApi.Instance.setPlayFFView(this); - // if (Doc.UserDoc()?.presentationMode === 'watching') { - // RecordingApi.Instance.pauseVideoAndMovements(); - // Doc.UserDoc().presentationMode = 'none'; - // // RecordingApi.Instance.pauseMovements() - // } // this is the easiest way to do this -> will talk with Bob about using mobx to do this to remove this line of code. - if (Doc.UserDoc()?.presentationMode === 'watching') RecordingApi.Instance.pauseFromInteraction(); + if (Doc.UserDoc()?.presentationMode === 'watching') ReplayMovements.Instance.pauseFromInteraction(); if (!this.isAnnotationOverlay && clamp) { // this section wraps the pan position, horizontally and/or vertically whenever the content is panned out of the viewing bounds diff --git a/src/client/views/nodes/RecordingBox/RecordingBox.tsx b/src/client/views/nodes/RecordingBox/RecordingBox.tsx index a28677525..0ff7c4292 100644 --- a/src/client/views/nodes/RecordingBox/RecordingBox.tsx +++ b/src/client/views/nodes/RecordingBox/RecordingBox.tsx @@ -8,7 +8,7 @@ import { FieldView } from "../FieldView"; import { VideoBox } from "../VideoBox"; import { RecordingView } from './RecordingView'; import { DocumentType } from "../../../documents/DocumentTypes"; -import { Presentation } from "../../../util/RecordingApi"; +import { Presentation } from "../../../util/TrackMovements"; import { Doc } from "../../../../fields/Doc"; import { Id } from "../../../../fields/FieldSymbols"; 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); diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx index 34df03954..5a221fea4 100644 --- a/src/client/views/nodes/VideoBox.tsx +++ b/src/client/views/nodes/VideoBox.tsx @@ -28,9 +28,9 @@ import { AnchorMenu } from "../pdf/AnchorMenu"; import { StyleProp } from "../StyleProvider"; import { FieldView, FieldViewProps } from './FieldView'; import "./VideoBox.scss"; -import { Presentation, RecordingApi } from "../../util/RecordingApi"; -import { List } from "../../../fields/List"; +import { Presentation } from "../../util/TrackMovements"; import { RecordingBox } from "./RecordingBox"; +import { ReplayMovements } from "../../util/ReplayMovements"; const path = require('path'); @@ -148,7 +148,7 @@ export class VideoBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp // if presentation data exists, pass it to the recordingPi if (this.presentation != null) { - RecordingApi.Instance.setVideoBox(this); + ReplayMovements.Instance.setVideoBox(this); } } @@ -159,7 +159,7 @@ export class VideoBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp // dispose the recordingApi's observer if (this.presentation != null) { - RecordingApi.Instance.removeVideoBox(); + ReplayMovements.Instance.removeVideoBox(); } } |
