@rightkit/video-ui 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/LICENSE-APACHE +201 -0
- package/LICENSE-MIT +21 -0
- package/README.md +47 -2
- package/dist/appName.d.ts +2 -0
- package/dist/appName.js +8 -0
- package/dist/components/DesktopWorkspace.d.ts +4 -0
- package/dist/components/DesktopWorkspace.js +527 -0
- package/dist/components/Player.d.ts +49 -0
- package/dist/components/Player.js +335 -0
- package/dist/components/RangePreview.d.ts +9 -0
- package/dist/components/RangePreview.js +22 -0
- package/dist/components/Workspace.css +15 -0
- package/dist/demo/DemoSettings.d.ts +1 -0
- package/dist/demo/DemoSettings.js +43 -0
- package/dist/demo/bindings.d.ts +121 -0
- package/dist/demo/bindings.js +57 -0
- package/dist/demo/demo.css +124 -0
- package/dist/demo/useDemo.d.ts +8 -0
- package/dist/demo/useDemo.js +37 -0
- package/dist/editor/CaptionInspector.d.ts +8 -0
- package/dist/editor/CaptionInspector.js +33 -0
- package/dist/editor/ChangesPanel.d.ts +13 -0
- package/dist/editor/ChangesPanel.js +87 -0
- package/dist/editor/ColourInspector.d.ts +5 -0
- package/dist/editor/ColourInspector.js +341 -0
- package/dist/editor/Inspector.d.ts +15 -0
- package/dist/editor/Inspector.js +202 -0
- package/dist/editor/Timeline.d.ts +39 -0
- package/dist/editor/Timeline.js +506 -0
- package/dist/editor/TimelineEditorView.d.ts +9 -0
- package/dist/editor/TimelineEditorView.js +237 -0
- package/dist/editor/TranscriptPanel.d.ts +20 -0
- package/dist/editor/TranscriptPanel.js +180 -0
- package/dist/editor/actions.d.ts +63 -0
- package/dist/editor/actions.js +124 -0
- package/dist/editor/adapter.d.ts +76 -0
- package/dist/editor/adapter.js +181 -0
- package/dist/editor/capabilities.d.ts +37 -0
- package/dist/editor/capabilities.js +33 -0
- package/dist/editor/gesture.d.ts +29 -0
- package/dist/editor/gesture.js +119 -0
- package/dist/editor/index.d.ts +10 -0
- package/dist/editor/index.js +7 -0
- package/dist/editor/keys.d.ts +15 -0
- package/dist/editor/keys.js +42 -0
- package/dist/editor/model.d.ts +88 -0
- package/dist/editor/model.js +87 -0
- package/dist/editor/transcript.d.ts +27 -0
- package/dist/editor/transcript.js +59 -0
- package/dist/editor/vendor/hyperframes/PlayheadIndicator.d.ts +9 -0
- package/dist/editor/vendor/hyperframes/PlayheadIndicator.js +38 -0
- package/dist/editor/vendor/hyperframes/audioWaveformPeaks.d.ts +7 -0
- package/dist/editor/vendor/hyperframes/audioWaveformPeaks.js +47 -0
- package/dist/editor/vendor/hyperframes/rulerGeometry.d.ts +13 -0
- package/dist/editor/vendor/hyperframes/rulerGeometry.js +133 -0
- package/dist/editor/vendor/hyperframes/useInspectorGestureTransaction.d.ts +33 -0
- package/dist/editor/vendor/hyperframes/useInspectorGestureTransaction.js +126 -0
- package/dist/env.d.ts +66 -0
- package/dist/hooks/useEngine.d.ts +10 -0
- package/dist/hooks/useEngine.js +68 -0
- package/dist/hooks/useHdrToSdr.d.ts +11 -0
- package/dist/hooks/useHdrToSdr.js +19 -0
- package/dist/hooks/useProgress.d.ts +10 -0
- package/dist/hooks/useProgress.js +32 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.js +57 -0
- package/dist/legal/legalConfig.d.ts +38 -0
- package/dist/legal/legalConfig.js +77 -0
- package/dist/lib/assemble.d.ts +100 -0
- package/dist/lib/assemble.js +72 -0
- package/dist/lib/asset.d.ts +2 -0
- package/dist/lib/asset.js +3 -0
- package/dist/lib/dialog.d.ts +4 -0
- package/dist/lib/dialog.js +44 -0
- package/dist/lib/engine.d.ts +44 -0
- package/dist/lib/engine.js +51 -0
- package/dist/lib/genright.d.ts +90 -0
- package/dist/lib/genright.js +160 -0
- package/dist/lib/media.d.ts +1045 -0
- package/dist/lib/media.js +171 -0
- package/dist/lib/mediaAdapters.d.ts +18 -0
- package/dist/lib/mediaAdapters.js +46 -0
- package/dist/lib/mic.d.ts +38 -0
- package/dist/lib/mic.js +14 -0
- package/dist/lib/models.d.ts +53 -0
- package/dist/lib/models.js +72 -0
- package/dist/lib/modelsBackend.d.ts +3 -0
- package/dist/lib/modelsBackend.js +68 -0
- package/dist/lib/progress.d.ts +77 -0
- package/dist/lib/progress.js +192 -0
- package/dist/lib/project.d.ts +138 -0
- package/dist/lib/project.js +48 -0
- package/dist/lib/services.d.ts +27 -0
- package/dist/lib/services.js +38 -0
- package/dist/lib/settingsBackend.d.ts +2 -0
- package/dist/lib/settingsBackend.js +57 -0
- package/dist/lib/shell.d.ts +172 -0
- package/dist/lib/shell.js +32 -0
- package/dist/styles.css +24 -0
- package/dist/ui/icons.d.ts +7 -0
- package/dist/ui/icons.js +62 -0
- package/dist/ui/index.d.ts +45 -0
- package/dist/ui/index.js +43 -0
- package/dist/ui/ui.css +104 -0
- package/dist/views/Assets.css +99 -0
- package/dist/views/AssetsView.d.ts +6 -0
- package/dist/views/AssetsView.js +371 -0
- package/dist/views/AutoEditView.d.ts +16 -0
- package/dist/views/AutoEditView.js +452 -0
- package/dist/views/BatchDelivery.d.ts +3 -0
- package/dist/views/BatchDelivery.js +331 -0
- package/dist/views/BundleExport.d.ts +3 -0
- package/dist/views/BundleExport.js +81 -0
- package/dist/views/Exports.css +117 -0
- package/dist/views/ExportsView.d.ts +12 -0
- package/dist/views/ExportsView.js +354 -0
- package/dist/views/FinishedEdit.css +546 -0
- package/dist/views/Home.css +97 -0
- package/dist/views/Home.d.ts +14 -0
- package/dist/views/Home.js +192 -0
- package/dist/views/Media.css +65 -0
- package/dist/views/OnboardingGate.d.ts +10 -0
- package/dist/views/OnboardingGate.js +54 -0
- package/dist/views/Phrases.css +45 -0
- package/dist/views/PhrasesView.d.ts +4 -0
- package/dist/views/PhrasesView.js +104 -0
- package/dist/views/ProgressView.d.ts +19 -0
- package/dist/views/ProgressView.js +36 -0
- package/dist/views/Prompt.css +84 -0
- package/dist/views/PromptPanel.d.ts +8 -0
- package/dist/views/PromptPanel.js +169 -0
- package/dist/views/Recipe.css +84 -0
- package/dist/views/RecipeLibrary.d.ts +7 -0
- package/dist/views/RecipeLibrary.js +104 -0
- package/dist/views/Retention.css +49 -0
- package/dist/views/RetentionView.d.ts +7 -0
- package/dist/views/RetentionView.js +145 -0
- package/dist/views/SettingsView.d.ts +9 -0
- package/dist/views/SettingsView.js +235 -0
- package/dist/views/Shorts.css +112 -0
- package/dist/views/ShortsView.d.ts +4 -0
- package/dist/views/ShortsView.js +205 -0
- package/dist/views/SourcesView.d.ts +6 -0
- package/dist/views/SourcesView.js +417 -0
- package/dist/views/TimelineView.d.ts +20 -0
- package/dist/views/TimelineView.js +12 -0
- package/package.json +68 -3
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { invoke } from "@tauri-apps/api/core";
|
|
2
|
+
import { shell } from "./shell.js";
|
|
3
|
+
export const engineStatus = async () => {
|
|
4
|
+
// Typed lifecycle snapshot from @rightkit/tauri-shell 0.1.2 (`rk_shell_engine_status`).
|
|
5
|
+
const status = (await shell.engine.status());
|
|
6
|
+
if (!status)
|
|
7
|
+
return { state: "failed", hello: null, restarts: 0, last_error: "no engine configured" };
|
|
8
|
+
return {
|
|
9
|
+
state: status.state === "error" ? "failed" : status.state,
|
|
10
|
+
hello: (status.hello ?? null),
|
|
11
|
+
restarts: status.restarts ?? 0,
|
|
12
|
+
last_error: status.last_error ?? status.message ?? null,
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export const engineDoctor = () => engineCall("doctor");
|
|
16
|
+
/** Allowlisted passthrough (see `ALLOWED_METHODS` in the supervisor). */
|
|
17
|
+
let activeCalls = 0;
|
|
18
|
+
export const engineBusy = () => activeCalls > 0;
|
|
19
|
+
export async function engineCall(method, params = {}, tag) {
|
|
20
|
+
activeCalls += 1;
|
|
21
|
+
try {
|
|
22
|
+
// Tagged call from @rightkit/tauri-shell 0.1.2: events echo the tag, failures reject typed.
|
|
23
|
+
return await shell.engine.callTagged(method, params, tag);
|
|
24
|
+
}
|
|
25
|
+
finally {
|
|
26
|
+
activeCalls -= 1;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export const revealPath = (path) => invoke("reveal_path", { path });
|
|
30
|
+
/** Every engine event payload (`{call, id, tag, event}`), lifecycle frames included. */
|
|
31
|
+
export const onEngineRaw = (handler) => shell.engine.onEvent(handler);
|
|
32
|
+
/** Frames are `{id: engine request id, tag: the caller's tag for that call, event}`. */
|
|
33
|
+
export function onEngineEvent(handler) {
|
|
34
|
+
return shell.engine.onEvent((frame) => {
|
|
35
|
+
if (frame.call === "$lifecycle" || frame.id === undefined)
|
|
36
|
+
return;
|
|
37
|
+
handler({ id: frame.id, tag: frame.tag ?? null, event: frame.event });
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
export function errorCode(error) {
|
|
41
|
+
if (error && typeof error === "object" && "code" in error) {
|
|
42
|
+
return String(error.code);
|
|
43
|
+
}
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
export function errorMessage(error) {
|
|
47
|
+
if (error && typeof error === "object" && "message" in error) {
|
|
48
|
+
return String(error.message);
|
|
49
|
+
}
|
|
50
|
+
return String(error);
|
|
51
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
export type HostState = "checking" | "ready" | "missing" | "outdated" | "unavailable";
|
|
2
|
+
export type HostInfo = {
|
|
3
|
+
state: HostState;
|
|
4
|
+
/** Engine error message, as reported. */
|
|
5
|
+
detail?: string;
|
|
6
|
+
enginePath?: string;
|
|
7
|
+
appVersion?: string;
|
|
8
|
+
/** Contract version the installed the host app reports (ready) or was found at (outdated). */
|
|
9
|
+
found?: number;
|
|
10
|
+
/** Contract version the host app requires (outdated, parsed from the engine message). */
|
|
11
|
+
required?: number;
|
|
12
|
+
/** What the user should do: install or update the host app. */
|
|
13
|
+
action?: "install" | "update";
|
|
14
|
+
};
|
|
15
|
+
export declare function interpretHost(result: unknown): HostInfo;
|
|
16
|
+
/** Status used when the call itself failed (engine down, timeout). */
|
|
17
|
+
export declare function genRightCallFailed(message: string): HostInfo;
|
|
18
|
+
export type HostJobState = "queued" | "running" | "ready" | "failed" | "cancelled" | "done" | "unknown" | "import_failed";
|
|
19
|
+
export type HostJob = {
|
|
20
|
+
requestId: string;
|
|
21
|
+
kind: string;
|
|
22
|
+
provider: string;
|
|
23
|
+
model: string;
|
|
24
|
+
prompt: string;
|
|
25
|
+
jobId: string | null;
|
|
26
|
+
/** Normalized: queued | running | ready | failed | cancelled | done. */
|
|
27
|
+
state: HostJobState;
|
|
28
|
+
/** the host app own status word when a live `job status` was fetched. */
|
|
29
|
+
engineStatus: string | null;
|
|
30
|
+
error: {
|
|
31
|
+
code?: string;
|
|
32
|
+
message?: string;
|
|
33
|
+
} | null;
|
|
34
|
+
imported: boolean;
|
|
35
|
+
estUsd: number | null;
|
|
36
|
+
actualUsd: number | null;
|
|
37
|
+
};
|
|
38
|
+
export declare function interpretJobRow(raw: unknown): HostJob | null;
|
|
39
|
+
export declare function interpretJobs(result: unknown): HostJob[];
|
|
40
|
+
/** One entry of `genright.recover`'s `recovered` array. */
|
|
41
|
+
export type RecoveredRequest = {
|
|
42
|
+
requestId: string;
|
|
43
|
+
state: HostJobState;
|
|
44
|
+
jobId?: string;
|
|
45
|
+
imported?: number;
|
|
46
|
+
error: {
|
|
47
|
+
code?: string;
|
|
48
|
+
message?: string;
|
|
49
|
+
} | null;
|
|
50
|
+
};
|
|
51
|
+
export declare function interpretRecover(result: unknown): RecoveredRequest[];
|
|
52
|
+
export type GeneratedAsset = {
|
|
53
|
+
assetId: string;
|
|
54
|
+
jobId: string;
|
|
55
|
+
requestId: string | null;
|
|
56
|
+
kind: string | null;
|
|
57
|
+
path: string;
|
|
58
|
+
mime: string;
|
|
59
|
+
bytes: number;
|
|
60
|
+
blake3: string;
|
|
61
|
+
provider: string;
|
|
62
|
+
model: string;
|
|
63
|
+
prompt: string | null;
|
|
64
|
+
estUsd: number | null;
|
|
65
|
+
actualUsd: number | null;
|
|
66
|
+
importedAt: number;
|
|
67
|
+
/** true when the project copy is still on disk. */
|
|
68
|
+
exists: boolean;
|
|
69
|
+
/** ready | missing */
|
|
70
|
+
state: string;
|
|
71
|
+
/** relink | regenerate | null — what to offer for a missing file. */
|
|
72
|
+
recovery: string | null;
|
|
73
|
+
/** Timeline source id once registered (BLAKE3), else null. */
|
|
74
|
+
sourceId: string | null;
|
|
75
|
+
};
|
|
76
|
+
export declare function interpretAsset(raw: unknown): GeneratedAsset | null;
|
|
77
|
+
export type AssetLibrary = {
|
|
78
|
+
assets: GeneratedAsset[];
|
|
79
|
+
openRequests: HostJob[];
|
|
80
|
+
};
|
|
81
|
+
export declare function interpretAssetLibrary(result: unknown): AssetLibrary;
|
|
82
|
+
/** `assets.place` placement modes (PlaceMode on the engine). */
|
|
83
|
+
export type PlaceMode = "append" | "broll" | "narration" | "music";
|
|
84
|
+
/**
|
|
85
|
+
* Which place modes an asset kind supports. Mirrors the engine's
|
|
86
|
+
* `RequestedKind::default_place_mode` (crates/cutright-engine/src/genright_cmd.rs):
|
|
87
|
+
* sfx and music land as a music bed, voice as narration or bed, and visual or
|
|
88
|
+
* transform kinds append or cover B-roll.
|
|
89
|
+
*/
|
|
90
|
+
export declare function placeModesFor(kind: string | null): PlaceMode[];
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
// `genright.status` as the engine returns it (crates/cutright-engine/src/genright_cmd.rs `status`):
|
|
2
|
+
// ready: {installed:true, ready:true, action:null, engine_path, app_version, contract_version, error:null}
|
|
3
|
+
// missing: {installed:false, ready:false, action:"install", error:{code:"genright_not_installed"|"genright_unavailable", message}}
|
|
4
|
+
// (installed but without an engine also comes back installed:false, action:"update")
|
|
5
|
+
// other: {installed:true, ready:false, action:"update"|"install", engine_path, error:{code, message}}
|
|
6
|
+
// code "genright_outdated" carries `contract version <found> is not supported (need <required>)`
|
|
7
|
+
// or `lacks capability <name> v<n>` in its message; anything else means the engine failed to run.
|
|
8
|
+
import { hostAppName } from "../appName.js";
|
|
9
|
+
const isObj = (v) => typeof v === "object" && v !== null;
|
|
10
|
+
const str = (v) => (typeof v === "string" ? v : undefined);
|
|
11
|
+
const num = (v) => (typeof v === "number" ? v : undefined);
|
|
12
|
+
export function interpretHost(result) {
|
|
13
|
+
const r = isObj(result) ? result : {};
|
|
14
|
+
const err = isObj(r.error) ? r.error : undefined;
|
|
15
|
+
const code = str(err?.code);
|
|
16
|
+
const detail = str(err?.message);
|
|
17
|
+
const enginePath = str(r.engine_path);
|
|
18
|
+
const action = r.action === "install" || r.action === "update" ? r.action : undefined;
|
|
19
|
+
if (r.ready === true) {
|
|
20
|
+
return {
|
|
21
|
+
state: "ready",
|
|
22
|
+
enginePath,
|
|
23
|
+
appVersion: str(r.app_version),
|
|
24
|
+
found: num(r.contract_version),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
if (r.installed === false || code === "genright_not_installed") {
|
|
28
|
+
return { state: "missing", detail, action: action ?? "install" };
|
|
29
|
+
}
|
|
30
|
+
if (code === "genright_outdated") {
|
|
31
|
+
const m = /contract version (\d+) is not supported \(need (\d+)\)/.exec(detail ?? "");
|
|
32
|
+
return {
|
|
33
|
+
state: "outdated",
|
|
34
|
+
detail,
|
|
35
|
+
enginePath,
|
|
36
|
+
found: m ? Number(m[1]) : undefined,
|
|
37
|
+
required: m ? Number(m[2]) : undefined,
|
|
38
|
+
action: "update",
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
if (r.ready === false) {
|
|
42
|
+
return { state: "unavailable", detail, enginePath, action: action ?? "update" };
|
|
43
|
+
}
|
|
44
|
+
return { state: "unavailable", detail: detail ?? `${hostAppName()} did not report ready.`, enginePath };
|
|
45
|
+
}
|
|
46
|
+
/** Status used when the call itself failed (engine down, timeout). */
|
|
47
|
+
export function genRightCallFailed(message) {
|
|
48
|
+
return { state: "unavailable", detail: message };
|
|
49
|
+
}
|
|
50
|
+
const optStr = (v) => (typeof v === "string" && v.length > 0 ? v : null);
|
|
51
|
+
export function interpretJobRow(raw) {
|
|
52
|
+
if (!isObj(raw))
|
|
53
|
+
return null;
|
|
54
|
+
const requestId = str(raw.request_id);
|
|
55
|
+
if (!requestId)
|
|
56
|
+
return null;
|
|
57
|
+
const err = isObj(raw.error) ? raw.error : null;
|
|
58
|
+
const state = str(raw.state);
|
|
59
|
+
return {
|
|
60
|
+
requestId,
|
|
61
|
+
kind: str(raw.kind) ?? "",
|
|
62
|
+
provider: str(raw.provider) ?? "",
|
|
63
|
+
model: str(raw.model) ?? "",
|
|
64
|
+
prompt: str(raw.prompt) ?? "",
|
|
65
|
+
jobId: optStr(raw.job_id),
|
|
66
|
+
state: state ?? "unknown",
|
|
67
|
+
engineStatus: optStr(raw.engine_status),
|
|
68
|
+
error: err ? { code: str(err.code), message: str(err.message) } : null,
|
|
69
|
+
imported: raw.imported === true,
|
|
70
|
+
estUsd: num(raw.est_usd) ?? null,
|
|
71
|
+
actualUsd: num(raw.actual_usd) ?? null,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
export function interpretJobs(result) {
|
|
75
|
+
const rows = isObj(result) && Array.isArray(result.jobs) ? result.jobs : [];
|
|
76
|
+
return rows.map(interpretJobRow).filter((j) => j !== null);
|
|
77
|
+
}
|
|
78
|
+
export function interpretRecover(result) {
|
|
79
|
+
const rows = isObj(result) && Array.isArray(result.recovered) ? result.recovered : [];
|
|
80
|
+
const out = [];
|
|
81
|
+
for (const raw of rows) {
|
|
82
|
+
if (!isObj(raw))
|
|
83
|
+
continue;
|
|
84
|
+
const requestId = str(raw.request_id);
|
|
85
|
+
if (!requestId)
|
|
86
|
+
continue;
|
|
87
|
+
const err = isObj(raw.error) ? raw.error : null;
|
|
88
|
+
out.push({
|
|
89
|
+
requestId,
|
|
90
|
+
state: str(raw.state) ?? "unknown",
|
|
91
|
+
jobId: optStr(raw.job_id) ?? undefined,
|
|
92
|
+
imported: num(raw.imported),
|
|
93
|
+
error: err ? { code: str(err.code), message: str(err.message) } : null,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
return out;
|
|
97
|
+
}
|
|
98
|
+
export function interpretAsset(raw) {
|
|
99
|
+
if (!isObj(raw))
|
|
100
|
+
return null;
|
|
101
|
+
const assetId = str(raw.asset_id);
|
|
102
|
+
const path = str(raw.path);
|
|
103
|
+
if (!assetId || !path)
|
|
104
|
+
return null;
|
|
105
|
+
return {
|
|
106
|
+
assetId,
|
|
107
|
+
jobId: str(raw.job_id) ?? "",
|
|
108
|
+
requestId: optStr(raw.request_id),
|
|
109
|
+
kind: optStr(raw.kind),
|
|
110
|
+
path,
|
|
111
|
+
mime: str(raw.mime) ?? "",
|
|
112
|
+
bytes: num(raw.bytes) ?? 0,
|
|
113
|
+
blake3: str(raw.blake3) ?? "",
|
|
114
|
+
provider: str(raw.provider) ?? "",
|
|
115
|
+
model: str(raw.model) ?? "",
|
|
116
|
+
prompt: optStr(raw.prompt),
|
|
117
|
+
estUsd: num(raw.est_usd) ?? null,
|
|
118
|
+
actualUsd: num(raw.actual_usd) ?? null,
|
|
119
|
+
importedAt: num(raw.imported_at) ?? 0,
|
|
120
|
+
exists: raw.exists === true,
|
|
121
|
+
state: str(raw.state) ?? "ready",
|
|
122
|
+
recovery: optStr(raw.recovery),
|
|
123
|
+
sourceId: optStr(raw.source_id),
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
export function interpretAssetLibrary(result) {
|
|
127
|
+
const r = isObj(result) ? result : {};
|
|
128
|
+
const assets = (Array.isArray(r.assets) ? r.assets : [])
|
|
129
|
+
.map(interpretAsset)
|
|
130
|
+
.filter((a) => a !== null);
|
|
131
|
+
const openRequests = (Array.isArray(r.open_requests) ? r.open_requests : [])
|
|
132
|
+
.map(interpretJobRow)
|
|
133
|
+
.filter((j) => j !== null);
|
|
134
|
+
return { assets, openRequests };
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Which place modes an asset kind supports. Mirrors the engine's
|
|
138
|
+
* `RequestedKind::default_place_mode` (crates/cutright-engine/src/genright_cmd.rs):
|
|
139
|
+
* sfx and music land as a music bed, voice as narration or bed, and visual or
|
|
140
|
+
* transform kinds append or cover B-roll.
|
|
141
|
+
*/
|
|
142
|
+
export function placeModesFor(kind) {
|
|
143
|
+
switch (kind) {
|
|
144
|
+
case "voice":
|
|
145
|
+
case "narration":
|
|
146
|
+
return ["narration", "music"];
|
|
147
|
+
case "music":
|
|
148
|
+
case "sfx":
|
|
149
|
+
return ["music"];
|
|
150
|
+
case "image":
|
|
151
|
+
case "video":
|
|
152
|
+
case "broll":
|
|
153
|
+
case "avatar":
|
|
154
|
+
case "upscale":
|
|
155
|
+
case "lipsync":
|
|
156
|
+
return ["append", "broll"];
|
|
157
|
+
default:
|
|
158
|
+
return ["append", "broll", "narration", "music"];
|
|
159
|
+
}
|
|
160
|
+
}
|