diff options
| author | Michael Foiani <sotech117@Michaels-MacBook-Pro-5.local> | 2022-06-10 12:04:03 -0400 |
|---|---|---|
| committer | Michael Foiani <sotech117@Michaels-MacBook-Pro-5.local> | 2022-06-10 12:04:03 -0400 |
| commit | 91e193ef15bfc82d21653e9f150ccc25389dd6f3 (patch) | |
| tree | ddca3cfebcb32be50045b8483eb3a349cf93914c /src/client/views/nodes/VideoBox.tsx | |
| parent | a2c3ed470c941b108aede045ac294e3b966990bc (diff) | |
| parent | e08c690dbeca3e58b1bc0d387df0287f60f58b7a (diff) | |
merge with jenny bug fixes and fix small ui
Diffstat (limited to 'src/client/views/nodes/VideoBox.tsx')
| -rw-r--r-- | src/client/views/nodes/VideoBox.tsx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx index baa0ae709..b14a1f0f6 100644 --- a/src/client/views/nodes/VideoBox.tsx +++ b/src/client/views/nodes/VideoBox.tsx @@ -357,7 +357,6 @@ export class VideoBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp // sets video element ref @action setVideoRef = (vref: HTMLVideoElement | null) => { - console.log("Set video ref " + vref) this._videoRef = vref; if (vref) { this._videoRef!.ontimeupdate = this.updateTimecode; @@ -365,7 +364,10 @@ export class VideoBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp // vref.onfullscreenchange = action((e) => this._fullScreen = vref.webkitDisplayingFullscreen); this._disposers.reactionDisposer?.(); this._disposers.reactionDisposer = reaction(() => NumCast(this.layoutDoc._currentTimecode), - time => !this._playing && (vref.currentTime = time), { fireImmediately: true }); + time => { + !this._playing && (vref.currentTime = time); + console.log("vref time = " + vref.currentTime) + }, { fireImmediately: true }); } } @@ -858,12 +860,13 @@ export class VideoBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp return <div className="videoBox-annotationLayer" style={{ transition: this.transition, height: `${this.heightPercent}%` }} ref={this._annotationLayer} />; } + savedAnnotations = () => this._savedAnnotations; render() { const borderRad = this.props.styleProvider?.(this.layoutDoc, this.props, StyleProp.BorderRounding); const borderRadius = borderRad?.includes("px") ? `${Number(borderRad.split("px")[0]) / this.scaling()}px` : borderRad; return (<div className="videoBox" onContextMenu={this.specificContextMenu} ref={this._mainCont} style={{ - pointerEvents: this.props.layerProvider?.(this.layoutDoc) === false ? "none" : undefined, + pointerEvents: this.layoutDoc._lockedPosition ? "none" : undefined, borderRadius, overflow: this.props.docViewPath?.().slice(-1)[0].fitWidth ? "auto" : undefined }} onWheel={e => { e.stopPropagation(); e.preventDefault(); }}> @@ -905,7 +908,7 @@ export class VideoBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp containerOffset={this.marqueeOffset} addDocument={this.addDocWithTimecode} finishMarquee={this.finishMarquee} - savedAnnotations={this._savedAnnotations} + savedAnnotations={this.savedAnnotations} annotationLayer={this._annotationLayer.current} mainCont={this._mainCont.current} />} |
