web/encode: expect polyfill to be present

This commit is contained in:
dumbmoron 2024-08-23 18:39:35 +00:00
parent f3a67554ff
commit 9410f613e4
No known key found for this signature in database

View file

@ -314,7 +314,7 @@ export default class EncodeLibAV extends LibAVWrapper {
codec = 'mp4a.40.29'; codec = 'mp4a.40.29';
} else throw "Unknown type: " + stream.codec_type; } else throw "Unknown type: " + stream.codec_type;
const config = await streamToConfig(libav, stream); const config = await streamToConfig(libav, stream, true);
if (config === null) { if (config === null) {
throw "could not make encoder config"; throw "could not make encoder config";
} }
@ -364,7 +364,7 @@ export default class EncodeLibAV extends LibAVWrapper {
initDecoder = webcodecs.initAudioDecoder.bind(webcodecs); initDecoder = webcodecs.initAudioDecoder.bind(webcodecs);
} else throw "Unknown type: " + stream.codec_type; } else throw "Unknown type: " + stream.codec_type;
const config = await streamToConfig(libav, stream); const config = await streamToConfig(libav, stream, true);
if (config === null) { if (config === null) {
throw "could not make decoder config"; throw "could not make decoder config";