aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/VideoBox.tsx
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-05-22 19:51:49 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-05-22 19:51:49 -0400
commit30fdae9e869e0f132c76b4fa99b784e75d6c8dae (patch)
tree01a86e92ed6cad6a0a9a6d8adea2e09dcc2f96be /src/client/views/nodes/VideoBox.tsx
parentfe9dbb871d613d6a55873bd317d0d1af13a50ad8 (diff)
A bunch of fixes/changes
Diffstat (limited to 'src/client/views/nodes/VideoBox.tsx')
-rw-r--r--src/client/views/nodes/VideoBox.tsx8
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}>