File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export interface ICombinatorOpts {
1010 fps ?: number ;
1111 bgColor ?: string ;
1212 videoCodec ?: string ;
13- audioCodec ?: string ;
13+ audioCodec ?: 'opus' | 'aac' ;
1414 opusConfig ?: object ;
1515 /**
1616 * false 合成的视频文件中排除音轨
@@ -91,20 +91,13 @@ export class Combinator {
9191 } )
9292 ) . supported ??
9393 false ) &&
94- ( (
95- await self . AudioEncoder . isConfigSupported ( {
96- codec : DEFAULT_AUDIO_CONF . codec ,
97- sampleRate : DEFAULT_AUDIO_CONF . sampleRate ,
98- numberOfChannels : DEFAULT_AUDIO_CONF . channelCount ,
99- } )
100- ) . supported ) ||
10194 (
10295 await self . AudioEncoder . isConfigSupported ( {
103- codec : args . audioCodec ,
96+ codec : args . audioCodec ?? DEFAULT_AUDIO_CONF . codec ,
10497 sampleRate : DEFAULT_AUDIO_CONF . sampleRate ,
10598 numberOfChannels : DEFAULT_AUDIO_CONF . channelCount ,
10699 } )
107- ) . supported ) ) ??
100+ ) . supported ) ??
108101 false
109102 ) ;
110103 }
You can’t perform that action at this time.
0 commit comments