From d4c2f743633baaaa78335e1541f4a125c56715af Mon Sep 17 00:00:00 2001 From: Tyler Schicke Date: Mon, 18 Mar 2019 14:45:40 -0400 Subject: Fixed video box --- src/client/views/nodes/VideoBox.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx index 8c1ee669f..09ae95183 100644 --- a/src/client/views/nodes/VideoBox.tsx +++ b/src/client/views/nodes/VideoBox.tsx @@ -42,15 +42,17 @@ export class VideoBox extends React.Component { render() { - let field = this.props.doc.Get(this.props.fieldKey) - let path = field == FieldWaiting ? "http://techslides.com/demos/sample-videos/small.mp4" : - field instanceof VideoField ? field.Data.href : "http://techslides.com/demos/sample-videos/small.mp4"; + let field = this.props.doc.GetT(this.props.fieldKey, VideoField); + if (!field || field === FieldWaiting) { + return
Loading
+ } + let path = field.Data.href; //setTimeout(action(() => this._loaded = true), 500); return ( {({ measureRef }) => -