From e7d41738198931dd54dc4ce0b74ee2654ba10bbd Mon Sep 17 00:00:00 2001
From: mehekj <mehek.jethani@gmail.com>
Date: Thu, 7 Oct 2021 16:45:08 -0400
Subject: minor bug fixes and added escape key to abort trim

---
 src/client/views/nodes/VideoBox.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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

diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx
index b1f049700..23c90de8a 100644
--- a/src/client/views/nodes/VideoBox.tsx
+++ b/src/client/views/nodes/VideoBox.tsx
@@ -419,12 +419,12 @@ export class VideoBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp
     finishTrim = action(() => {
         this.Pause();
         this.setPlayheadTime(Math.max(Math.min(this.timeline?.trimEnd || 0, this.player!.currentTime), this.timeline?.trimStart || 0));
-        this._stackedTimeline.current?.StopTrimming();
+        this.timeline?.StopTrimming();
     });
 
     startTrim = (scope: TrimScope) => {
         this.Pause();
-        this._stackedTimeline.current?.StartTrimming(scope);
+        this.timeline?.StartTrimming(scope);
     }
 
     onClipPointerDown = (e: React.PointerEvent) => {
@@ -441,7 +441,7 @@ export class VideoBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp
 
     playLink = (doc: Doc) => {
         const startTime = Math.max(0, (this._stackedTimeline.current?.anchorStart(doc) || 0));
-        const endTime = this._stackedTimeline.current?.anchorEnd(doc);
+        const endTime = this.timeline?.anchorEnd(doc);
         if (startTime !== undefined) {
             if (!this.layoutDoc.dontAutoPlayFollowedLinks) endTime ? this.playFrom(startTime, endTime) : this.playFrom(startTime);
             else this.Seek(startTime);
-- 
cgit v1.2.3-70-g09d2

