mulmocast 1.2.14 → 1.2.15
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.
|
@@ -42,8 +42,9 @@ export const imagePreprocessAgent = async (namedInputs) => {
|
|
|
42
42
|
returnValue.lipSyncModel = beat.lipSyncParams?.model ?? context.presentationStyle.lipSyncParams?.model ?? lipSyncAgentInfo.defaultModel;
|
|
43
43
|
returnValue.lipSyncFile = moviePaths.lipSyncFile;
|
|
44
44
|
if (context.studio.script.audioParams?.suppressSpeech) {
|
|
45
|
-
|
|
46
|
-
returnValue.
|
|
45
|
+
// studio beat may ot have startAt and duration yet, in case of API call from the app.
|
|
46
|
+
returnValue.startAt = context.studio.beats.filter((_, i) => i < index).reduce((acc, curr) => acc + (curr.duration ?? 0), 0);
|
|
47
|
+
returnValue.duration = beat.duration ?? 0;
|
|
47
48
|
returnValue.lipSyncTrimAudio = true;
|
|
48
49
|
returnValue.bgmFile = MulmoMediaSourceMethods.resolve(context.studio.script.audioParams.bgm, context);
|
|
49
50
|
const folderName = MulmoStudioContextMethods.getFileName(context);
|
package/lib/actions/images.js
CHANGED
|
@@ -231,6 +231,7 @@ const beat_graph_data = {
|
|
|
231
231
|
return { buffer };
|
|
232
232
|
},
|
|
233
233
|
inputs: {
|
|
234
|
+
onComplete: [":imageGenerator", ":imagePlugin"],
|
|
234
235
|
audioFile: ":preprocessor.audioFile",
|
|
235
236
|
bgmFile: ":preprocessor.bgmFile",
|
|
236
237
|
startAt: ":preprocessor.startAt",
|
|
@@ -240,8 +241,8 @@ const beat_graph_data = {
|
|
|
240
241
|
file: ":preprocessor.audioFile",
|
|
241
242
|
index: ":__mapIndex",
|
|
242
243
|
id: ":beat.id",
|
|
243
|
-
sessionType: "audioTrimmer",
|
|
244
244
|
mulmoContext: ":context",
|
|
245
|
+
// sessionType: undefined, // no need to notify state change
|
|
245
246
|
},
|
|
246
247
|
},
|
|
247
248
|
defaultValue: {},
|
|
@@ -14,7 +14,7 @@ export declare const MulmoStudioContextMethods: {
|
|
|
14
14
|
getFileName(context: MulmoStudioContext): string;
|
|
15
15
|
getCaption(context: MulmoStudioContext): string | undefined;
|
|
16
16
|
setSessionState(context: MulmoStudioContext, sessionType: SessionType, value: boolean): void;
|
|
17
|
-
setBeatSessionState(context: MulmoStudioContext, sessionType: BeatSessionType, index: number, id: string | undefined, value: boolean): void;
|
|
17
|
+
setBeatSessionState(context: MulmoStudioContext, sessionType: BeatSessionType | undefined, index: number, id: string | undefined, value: boolean): void;
|
|
18
18
|
needTranslate(context: MulmoStudioContext, includeCaption?: boolean): boolean | "" | undefined;
|
|
19
19
|
getIntroPadding(context: MulmoStudioContext): number;
|
|
20
20
|
};
|
|
@@ -53,6 +53,9 @@ export const MulmoStudioContextMethods = {
|
|
|
53
53
|
notifyStateChange(context, sessionType);
|
|
54
54
|
},
|
|
55
55
|
setBeatSessionState(context, sessionType, index, id, value) {
|
|
56
|
+
if (!sessionType) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
56
59
|
const key = beatId(id, index);
|
|
57
60
|
if (value) {
|
|
58
61
|
if (!context.sessionState.inBeatSession[sessionType]) {
|