From 20f809ab0b15bbee8f6ebaf79dcb5861cfa2ec5f Mon Sep 17 00:00:00 2001
From: andrewdkim <adkim414@gmail.com>
Date: Mon, 22 Jul 2019 16:49:10 -0400
Subject: video integration (almost there)

---
 src/client/views/nodes/Timeline.tsx | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

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

diff --git a/src/client/views/nodes/Timeline.tsx b/src/client/views/nodes/Timeline.tsx
index 2b3563963..e2112a0f0 100644
--- a/src/client/views/nodes/Timeline.tsx
+++ b/src/client/views/nodes/Timeline.tsx
@@ -74,7 +74,19 @@ export class Timeline extends CollectionSubView(Document) {
 
     componentDidMount() {
         if (StrCast(this.props.Document.type) === "video") {
-      
+            console.log("ran"); 
+            console.log(this.props.Document.duration); 
+            if (this.props.Document.duration){
+                this._time = Math.round(NumCast(this.props.Document.duration))  * 1000; 
+
+                reaction(() => {
+                    return NumCast(this.props.Document.curPage); 
+                }, curPage => {
+                    this.changeCurrentBarX(curPage * this._tickIncrement / this._tickSpacing)
+                }); 
+
+            }
+            
         }   
         runInAction(() => {
             reaction(() => {
-- 
cgit v1.2.3-70-g09d2

