From 65bd18723919b81bda6d2371456c4ba69bcc593f Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 13 Sep 2023 14:57:20 -0400 Subject: fixed carouselView to not pass setContentView to child layouts which prevent linkFollowing from never terminating. fixed clipped videos to have the right start/end bounds on the timeline. --- src/client/views/collections/CollectionCarouselView.tsx | 3 ++- src/client/views/nodes/VideoBox.tsx | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionCarouselView.tsx b/src/client/views/collections/CollectionCarouselView.tsx index ea02bcd4c..7fa36d228 100644 --- a/src/client/views/collections/CollectionCarouselView.tsx +++ b/src/client/views/collections/CollectionCarouselView.tsx @@ -47,7 +47,7 @@ export class CollectionCarouselView extends CollectionSubView() { @computed get content() { const index = NumCast(this.layoutDoc._carousel_index); const curDoc = this.childLayoutPairs?.[index]; - const captionProps = { ...this.props, fieldKey: 'caption', setHeight: undefined }; + const captionProps = { ...this.props, fieldKey: 'caption', setHeight: undefined, setContentView: undefined }; const marginX = NumCast(this.layoutDoc['caption_xMargin']); const marginY = NumCast(this.layoutDoc['caption_yMargin']); const show_captions = StrCast(this.layoutDoc._layout_showCaption); @@ -58,6 +58,7 @@ export class CollectionCarouselView extends CollectionSubView() { {...this.props} NativeWidth={returnZero} NativeHeight={returnZero} + setContentView={undefined} onDoubleClick={this.onContentDoubleClick} onClick={this.onContentClick} isDocumentActive={this.props.childDocumentsActive?.() ? this.props.isDocumentActive : this.props.isContentActive} diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx index a4d9ea04a..d7f7c9b73 100644 --- a/src/client/views/nodes/VideoBox.tsx +++ b/src/client/views/nodes/VideoBox.tsx @@ -57,6 +57,7 @@ export class VideoBox extends ViewBoxAnnotatableComponent ref @@ -124,6 +125,7 @@ export class VideoBox extends ViewBoxAnnotatableComponent this._disposers[d]?.()); @@ -409,7 +412,7 @@ export class VideoBox extends ViewBoxAnnotatableComponent { - this.player && (this.layoutDoc._layout_currentTimecode = this.player.currentTime); + !this.unmounting && this.player && (this.layoutDoc._layout_currentTimecode = this.player.currentTime); try { this._youtubePlayer && (this.layoutDoc._layout_currentTimecode = this._youtubePlayer.getCurrentTime?.()); } catch (e) { @@ -1119,7 +1122,7 @@ export class VideoBox extends ViewBoxAnnotatableComponent
@@ -1128,7 +1131,7 @@ export class VideoBox extends ViewBoxAnnotatableComponent 150 && (
-
{formatTime(curTime)}
+
{formatTime(curTime - (this.timeline?.clipStart || 0))}
{this._fullScreen || (this.heightPercent === 100 && width > 200) ? (
-- cgit v1.2.3-70-g09d2