aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/VideoBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-05-01 09:47:11 -0400
committerbobzel <zzzman@gmail.com>2024-05-01 09:47:11 -0400
commit76838b7b3842c9b184e6459e29796dd14de37e8d (patch)
treef96cc6db69e72e90179e8b1c3003401146ee3522 /src/client/views/nodes/VideoBox.tsx
parent098deaa68c8b9bb781748fbe0c1bd0104bab3596 (diff)
more cycle import removal. fixed ndollar bugs introduced during lint changes.
Diffstat (limited to 'src/client/views/nodes/VideoBox.tsx')
-rw-r--r--src/client/views/nodes/VideoBox.tsx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx
index 16767d11e..f32d00386 100644
--- a/src/client/views/nodes/VideoBox.tsx
+++ b/src/client/views/nodes/VideoBox.tsx
@@ -10,13 +10,12 @@ import { DocData } from '../../../fields/DocSymbols';
import { InkTool } from '../../../fields/InkField';
import { List } from '../../../fields/List';
import { ObjectField } from '../../../fields/ObjectField';
-import { FollowLinkScript } from '../../../fields/ScriptField';
import { Cast, NumCast, StrCast, toList } from '../../../fields/Types';
import { AudioField, ImageField, VideoField } from '../../../fields/URLField';
import { emptyFunction, formatTime } from '../../../Utils';
import { Docs } from '../../documents/Documents';
import { DocumentType } from '../../documents/DocumentTypes';
-import { DocUtils } from '../../documents/DocUtils';
+import { DocUtils, FollowLinkScript } from '../../documents/DocUtils';
import { DocumentManager } from '../../util/DocumentManager';
import { dropActionType } from '../../util/DropActionTypes';
import { LinkManager } from '../../util/LinkManager';
@@ -36,6 +35,7 @@ import { FieldView, FieldViewProps } from './FieldView';
import { FocusViewOptions } from './FocusViewOptions';
import { RecordingBox } from './RecordingBox';
import './VideoBox.scss';
+import { VideoThumbnails } from '../global/globalEnums';
/**
* VideoBox
@@ -55,7 +55,6 @@ export class VideoBox extends ViewBoxAnnotatableComponent<FieldViewProps>() impl
return FieldView.LayoutString(VideoBox, fieldKey);
}
static heightPercent = 80; // height of video relative to videoBox when timeline is open
- static numThumbnails = 20;
private unmounting = false;
private _disposers: { [name: string]: IReactionDisposer } = {};
private _videoRef: HTMLVideoElement | null = null; // <video> ref
@@ -416,7 +415,7 @@ export class VideoBox extends ViewBoxAnnotatableComponent<FieldViewProps>() impl
const retitled = StrCast(this.Document.title).replace(/[ -.:]/g, '');
const encodedFilename = encodeURIComponent('thumbnail' + retitled + '_' + video.currentTime.toString().replace(/\./, '_'));
thumbnailPromises?.push(ClientUtils.convertDataUri(canvas.toDataURL(), basename(encodedFilename), true));
- const newTime = video.currentTime + video.duration / (VideoBox.numThumbnails - 1);
+ const newTime = video.currentTime + video.duration / (VideoThumbnails.DENSE - 1);
if (newTime < video.duration) {
video.currentTime = newTime;
} else {