release Timeline Studio v0.4.1

This commit is contained in:
haixin.yang committed 2026-07-20 14:00:00 +08:00
1 parent 47d5f6315d
commit 20e9f265d8
46 files changed
+2666 -202

No files matched your search

+17
View File
@@ -125,3 +125,20 @@ export function revokeVisionObjectUrls(value) {
}
export function getTimelineTrackLocalTime(time, start = 0, duration = 0) { return Math.max(0, Math.min(duration || 0, time - start)); }
export function isTimelineTimeInsideTrack(time, start = 0, duration = 0) { return duration > 0 && time >= start && time <= start + duration; }
export function requestTimelineMediaPlay(media) {
if (!media || media.__timelinePlayPending) return;
media.__timelinePlayPending = true;
let request;
try {
request = media.play();
} catch {
media.__timelinePlayPending = false;
return;
}
if (!request?.then) {
media.__timelinePlayPending = false;
return;
}
request.catch(() => {}).finally(() => { media.__timelinePlayPending = false; });
}