diff options
| author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-05-22 19:51:49 -0400 |
|---|---|---|
| committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-05-22 19:51:49 -0400 |
| commit | 30fdae9e869e0f132c76b4fa99b784e75d6c8dae (patch) | |
| tree | 01a86e92ed6cad6a0a9a6d8adea2e09dcc2f96be /src/client/views/nodes/VideoBox.tsx | |
| parent | fe9dbb871d613d6a55873bd317d0d1af13a50ad8 (diff) | |
A bunch of fixes/changes
Diffstat (limited to 'src/client/views/nodes/VideoBox.tsx')
| -rw-r--r-- | src/client/views/nodes/VideoBox.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx index 6ae55d151..ab57b4b04 100644 --- a/src/client/views/nodes/VideoBox.tsx +++ b/src/client/views/nodes/VideoBox.tsx @@ -88,10 +88,14 @@ export class VideoBox extends DocComponent<FieldViewProps, VideoDocument>(VideoD if (vref) { vref.onfullscreenchange = action((e) => this._fullScreen = vref.webkitDisplayingFullscreen); if (this._reactionDisposer) this._reactionDisposer(); - this._reactionDisposer = reaction(() => this.props.Document.curPage, () => - vref.currentTime = NumCast(this.props.Document.curPage, 0), { fireImmediately: true }); + this._reactionDisposer = reaction(() => this.props.Document.curPage, () => { + if (!this.Playing) { + vref.currentTime = NumCast(this.props.Document.curPage, 0); + } + }, { fireImmediately: true }); } } + videoContent(path: string) { let style = "videoBox-cont" + (this._fullScreen ? "-fullScreen" : ""); return <video className={`${style}`} ref={this.setVideoRef} onPointerDown={this.onPointerDown}> |
