* Creates a new AudioEncoder.
(init: AudioEncoderInit)
| 101 | * Creates a new AudioEncoder. |
| 102 | */ |
| 103 | constructor(init: AudioEncoderInit) { |
| 104 | super(); |
| 105 | |
| 106 | if (!init.output || !init.error) { |
| 107 | throw new TypeError('AudioEncoderInit requires \'output\' and \'error\' callbacks.'); |
| 108 | } |
| 109 | |
| 110 | this.init = init; |
| 111 | this.frame = new Frame(); |
| 112 | this.frame.alloc(); |
| 113 | this.packet = new Packet(); |
| 114 | this.packet.alloc(); |
| 115 | } |
| 116 | |
| 117 | private static createCodecContext(config: AudioEncoderConfig) { |
| 118 | const inferred = inferCodecFromCodecString(config.codec); |
nothing calls this directly
no outgoing calls
no test coverage detected