Release Timeline Studio v0.4.0

This commit is contained in:
haixin.yang committed 2026-07-18 16:06:53 +08:00
1 parent 2b9a1e7e0b
commit 7076e005af
66 files changed
+2246 -545

No files matched your search

+5 -1
View File
@@ -1,9 +1,13 @@
import { RATIO_OPTIONS } from "../config/editor.js";
export const PLAYBACK_UI_FRAME_MS = 50;
export const PLAYBACK_UI_FRAME_MS = 80;
export const DEFAULT_VISION_OPTIONS = Object.freeze({ showDetections: true, removeBackground: false, avoidCaptions: true, smartCrop: true });
export const EMPTY_VISION_OPTIONS = Object.freeze({ showDetections: false, removeBackground: false, avoidCaptions: false, smartCrop: false });
export function shouldCorrectPreviewMediaTime({ isPlaying, currentTime, targetTime, threshold = 0.04 }) {
return !isPlaying && Number.isFinite(targetTime) && Math.abs((Number(currentTime) || 0) - targetTime) > threshold;
}
export function getAudioSegmentPreviewVolume(segment, timelineTime) {
const volume = Math.max(0, Math.min(1, segment.volume ?? 1));
const localTime = Math.max(0, Math.min(segment.duration, timelineTime - segment.start));