aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/VideoBox.tsx
diff options
context:
space:
mode:
authorMichael Foiani <sotech117@michaels-mbp-3.devices.brown.edu>2022-05-04 03:30:07 -0400
committerMichael Foiani <sotech117@michaels-mbp-3.devices.brown.edu>2022-05-04 03:30:07 -0400
commita2173243c7a447527e2e86ec0a00998ed8b9cc40 (patch)
tree8bb3801f2298e0083d8eda69e0d5491617afe71c /src/client/views/nodes/VideoBox.tsx
parent4dc4b0939d4e4afbc9f6db999ff80d434ef4ccc6 (diff)
Get play and pause to work. There is a bug with getting double called that was causing choppiness.
Diffstat (limited to 'src/client/views/nodes/VideoBox.tsx')
-rw-r--r--src/client/views/nodes/VideoBox.tsx10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx
index 7364a64d9..15a198a00 100644
--- a/src/client/views/nodes/VideoBox.tsx
+++ b/src/client/views/nodes/VideoBox.tsx
@@ -156,11 +156,10 @@ export class VideoBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp
@action public Play = (update: boolean = true) => {
// if presentation isn't null, call followmovements on the recording api
if (this.presentation) {
- const err = RecordingApi.Instance.followMovements(this.presentation);
- if (err) console.log(err);
+ const err = RecordingApi.Instance.playMovements(this.presentation, this.player?.currentTime || 0);
+ err && console.log(err)
}
-
this._playing = true;
const eleTime = this.player?.currentTime || 0;
if (this.timeline) {
@@ -198,6 +197,11 @@ export class VideoBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp
// pauses video
@action public Pause = (update: boolean = true) => {
+ if (this.presentation) {
+ const err = RecordingApi.Instance.pauseMovements();
+ err && console.log(err);
+ }
+
this._playing = false;
this.removeCurrentlyPlaying();
try {