(e: unknown)
| 696 | } |
| 697 | |
| 698 | private handleAsyncError(e: unknown) { |
| 699 | const error = e instanceof DOMException |
| 700 | ? e |
| 701 | : e instanceof Error |
| 702 | ? new DOMException(e.message, 'EncodingError') |
| 703 | : new DOMException('Decoding error', 'EncodingError'); |
| 704 | |
| 705 | this.close(); |
| 706 | this.init.error(error); |
| 707 | } |
| 708 | } |
| 709 | |
| 710 | export const getDecentVideoBitrate = (codec: AVCodecID, width: number, height: number) => { |