MCPcopy Create free account
hub / github.com/Vanilagy/webcodecs-polyfill / handleAsyncError

Method handleAsyncError

src/audio_encoder.ts:685–694  ·  view source on GitHub ↗
(e: unknown)

Source from the content-addressed store, hash-verified

683 }
684
685 private handleAsyncError(e: unknown) {
686 const error = e instanceof DOMException
687 ? e
688 : e instanceof Error
689 ? new DOMException(e.message, 'EncodingError')
690 : new DOMException('Decoding error', 'EncodingError');
691
692 this.close();
693 this.init.error(error);
694 }
695}
696
697export const getDecentAudioBitrate = (codec: AVCodecID) => {

Callers 3

configureMethod · 0.95
encodeMethod · 0.95
flushMethod · 0.95

Calls 1

closeMethod · 0.95

Tested by

no test coverage detected