Release Timeline Studio v0.4.0
This commit is contained in:
1 parent
2b9a1e7e0b
commit
7076e005af
66 files changed
+2246
-545
No files matched your search
@@ -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));
|
||||
|
||||
Reference in new issue
Block a user