diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2019-04-26 08:41:53 -0400 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2019-04-26 08:41:53 -0400 |
| commit | 96b1e27da348e47a4d5c83b182a5f55e96e3218e (patch) | |
| tree | 3d2584e9b352397ae0d4ee208f71d9288b39ef01 /src/client/views/nodes/VideoBox.tsx | |
| parent | b742c8850b184408fd61d8571fa68ecf01386141 (diff) | |
fixed keyboard modifier to not create document. cleaned up videobox render.
Diffstat (limited to 'src/client/views/nodes/VideoBox.tsx')
| -rw-r--r-- | src/client/views/nodes/VideoBox.tsx | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx index 1e6bc58c9..019e5e489 100644 --- a/src/client/views/nodes/VideoBox.tsx +++ b/src/client/views/nodes/VideoBox.tsx @@ -53,25 +53,26 @@ export class VideoBox extends React.Component<FieldViewProps> { (vref as any).AHackBecauseSomethingResetsTheVideoToZero = this.curPage; } } + videoContent(path: string) { + return <video className="videobox-cont" ref={this.setVideoRef}> + <source src={path} type="video/mp4" /> + Not supported. + </video>; + } render() { let field = this.props.Document.GetT(this.props.fieldKey, VideoField); if (!field || field === FieldWaiting) { return <div>Loading</div>; } - let path = field.Data.href; - trace(); - return ( + return (this.props.Document.GetNumber(KeyStore.NativeHeight, 0)) ? + this.videoContent(field.data.href) : <Measure onResize={this.setScaling}> {({ measureRef }) => <div style={{ width: "100%", height: "auto" }} ref={measureRef}> - <video className="videobox-cont" ref={this.setVideoRef}> - <source src={path} type="video/mp4" /> - Not supported. - </video> + {this.videoContent(field.data.href)} </div> } - </Measure> - ); + </Measure>; } }
\ No newline at end of file |
