mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-09 00:33:46 +02:00
Add WebMInputFormat, add OutputFormat.getFileExtension()
This commit is contained in:
@@ -12,6 +12,7 @@ export abstract class OutputFormat {
|
||||
|
||||
/** @internal */
|
||||
abstract _getName(): string;
|
||||
abstract getFileExtension(): string;
|
||||
abstract getSupportedCodecs(): MediaCodec[];
|
||||
|
||||
getSupportedVideoCodecs() {
|
||||
@@ -69,6 +70,10 @@ export class Mp4OutputFormat extends IsobmffOutputFormat {
|
||||
return 'MP4';
|
||||
}
|
||||
|
||||
getFileExtension() {
|
||||
return '.mp4';
|
||||
}
|
||||
|
||||
getSupportedCodecs() {
|
||||
return Mp4OutputFormat.getSupportedCodecs();
|
||||
}
|
||||
@@ -98,6 +103,10 @@ export class MovOutputFormat extends IsobmffOutputFormat {
|
||||
return 'MOV';
|
||||
}
|
||||
|
||||
getFileExtension() {
|
||||
return '.mov';
|
||||
}
|
||||
|
||||
getSupportedCodecs() {
|
||||
return MovOutputFormat.getSupportedCodecs();
|
||||
}
|
||||
@@ -152,6 +161,10 @@ export class MkvOutputFormat extends OutputFormat {
|
||||
return 'Matroska';
|
||||
}
|
||||
|
||||
getFileExtension() {
|
||||
return '.mkv';
|
||||
}
|
||||
|
||||
getSupportedCodecs() {
|
||||
return MkvOutputFormat.getSupportedCodecs();
|
||||
}
|
||||
@@ -181,6 +194,10 @@ export class WebMOutputFormat extends MkvOutputFormat {
|
||||
return 'WebM';
|
||||
}
|
||||
|
||||
override getFileExtension() {
|
||||
return '.webm';
|
||||
}
|
||||
|
||||
static override getSupportedCodecs(): MediaCodec[] {
|
||||
return [
|
||||
'vp8', 'vp9', 'av1',
|
||||
@@ -211,6 +228,10 @@ export class WaveOutputFormat extends OutputFormat {
|
||||
return 'WAVE';
|
||||
}
|
||||
|
||||
getFileExtension() {
|
||||
return '.wav';
|
||||
}
|
||||
|
||||
getSupportedCodecs() {
|
||||
return WaveOutputFormat.getSupportedCodecs();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user