(e: unknown)
| 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 | |
| 697 | export const getDecentAudioBitrate = (codec: AVCodecID) => { |