Release Timeline Studio v0.6.0
This commit is contained in:
1 parent
2ebcf6a673
commit
fecf450037
57 files changed
+2790
-197
No files matched your search
@@ -0,0 +1,41 @@
|
||||
const GENERIC_CLIP_ACTIONS = ["dismiss", "edit", "split", "copy", "delete"];
|
||||
const AUDIO_CLIP_ACTIONS = ["dismiss", "edit", "split", "captions", "separate", "delete"];
|
||||
const MUSIC_CLIP_ACTIONS = ["dismiss", "audio", "split", "captions", "separate", "delete"];
|
||||
const SOURCE_AUDIO_CLIP_ACTIONS = ["dismiss", "audio", "split", "captions", "delete"];
|
||||
const STICKER_CLIP_ACTIONS = ["dismiss", "properties", "copy", "delete"];
|
||||
|
||||
export function getMobileClipActionIds(track, options = {}) {
|
||||
if (track === "audio") return AUDIO_CLIP_ACTIONS;
|
||||
if (track === "music") return MUSIC_CLIP_ACTIONS;
|
||||
if (track === "source") return SOURCE_AUDIO_CLIP_ACTIONS;
|
||||
if (track === "sticker") return STICKER_CLIP_ACTIONS;
|
||||
if (track === "image" && options.canExtractSourceAudio) {
|
||||
return ["dismiss", "edit", "split", "copy", "extract-source-audio", "delete"];
|
||||
}
|
||||
return GENERIC_CLIP_ACTIONS;
|
||||
}
|
||||
|
||||
export function getMobileClipPanel() {
|
||||
return "inspector";
|
||||
}
|
||||
|
||||
export function getMobileClipPanelOrigin(track) {
|
||||
if (track === "sticker") return "sticker-clip";
|
||||
return ["audio", "source", "music"].includes(track) ? "audio-clip" : "";
|
||||
}
|
||||
|
||||
export function shouldActivateToolRailForClip(isMobile) {
|
||||
return !isMobile;
|
||||
}
|
||||
|
||||
export function resolveMobileClipActionTrack(explicitTrack, selections = {}) {
|
||||
if (explicitTrack) return explicitTrack;
|
||||
if (selections.visual) return "image";
|
||||
if (selections.overlay) return "overlay";
|
||||
if (selections.sticker) return "sticker";
|
||||
if (selections.caption) return "caption";
|
||||
if (selections.source) return "source";
|
||||
if (selections.audio) return "audio";
|
||||
if (selections.music) return "music";
|
||||
return "";
|
||||
}
|
||||
Reference in new issue
Block a user