diff options
author | Sam Wilkins <samwilkins333@gmail.com> | 2019-07-22 15:36:26 -0400 |
---|---|---|
committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-07-22 15:36:26 -0400 |
commit | db7b55c3cc6f1907d19de83253cd1b1e1cfaf246 (patch) | |
tree | f99b083b0726e7947d178049114fef9beffcad6b /src/client/views/nodes/VideoBox.tsx | |
parent | 3e3d592e677a30c7fb7ca721293ea09b231a97a3 (diff) | |
parent | 872d5b1ddd8868d316b0775317a73a04de8c240b (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/nodes/VideoBox.tsx')
-rw-r--r-- | src/client/views/nodes/VideoBox.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx index 0f2d18f6b..83ad2a3b3 100644 --- a/src/client/views/nodes/VideoBox.tsx +++ b/src/client/views/nodes/VideoBox.tsx @@ -52,13 +52,14 @@ export class VideoBox extends DocComponent<FieldViewProps, VideoDocument>(VideoD this.Document.nativeHeight = this.Document.nativeWidth / aspect; this.Document.height = FieldValue(this.Document.width, 0) / aspect; } + if (!this.Document.duration) this.Document.duration = this.player!.duration; } @action public Play = (update: boolean = true) => { this.Playing = true; update && this.player && this.player.play(); update && this._youtubePlayer && this._youtubePlayer.playVideo(); - !this._playTimer && (this._playTimer = setInterval(this.updateTimecode, 500)); + !this._playTimer && (this._playTimer = setInterval(this.updateTimecode, 5)); this.updateTimecode(); } |