更新
This commit is contained in:
@@ -19,6 +19,8 @@ interface RenderOptions {
|
||||
titleDisplayMode?: 'short' | 'persistent';
|
||||
subtitleStyle?: Record<string, unknown>;
|
||||
titleStyle?: Record<string, unknown>;
|
||||
secondaryTitle?: string;
|
||||
secondaryTitleStyle?: Record<string, unknown>;
|
||||
outputPath: string;
|
||||
fps?: number;
|
||||
enableSubtitles?: boolean;
|
||||
@@ -75,6 +77,16 @@ async function parseArgs(): Promise<RenderOptions> {
|
||||
console.warn('Invalid titleStyle JSON');
|
||||
}
|
||||
break;
|
||||
case 'secondaryTitle':
|
||||
options.secondaryTitle = value;
|
||||
break;
|
||||
case 'secondaryTitleStyle':
|
||||
try {
|
||||
options.secondaryTitleStyle = JSON.parse(value);
|
||||
} catch (e) {
|
||||
console.warn('Invalid secondaryTitleStyle JSON');
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,6 +173,8 @@ async function main() {
|
||||
titleDisplayMode: options.titleDisplayMode || 'short',
|
||||
subtitleStyle: options.subtitleStyle,
|
||||
titleStyle: options.titleStyle,
|
||||
secondaryTitle: options.secondaryTitle,
|
||||
secondaryTitleStyle: options.secondaryTitleStyle,
|
||||
enableSubtitles: options.enableSubtitles !== false,
|
||||
width: videoWidth,
|
||||
height: videoHeight,
|
||||
|
||||
Reference in New Issue
Block a user