jessibuca
Version:
a h5 live stream player
80 lines (46 loc) • 1.74 kB
text/typescript
export { AudioDecoderSoft } from "./audio_decoder_soft";
export { AudioDecoderHard } from "./audio_decoder_hard";
// export class AudioDecoder extends EventEmitter implements AudioDecoderInterface {
// decoder: AudioDecoderSoft;
// constructor(adtype: AudioDecoderType) {
// super();
// if (adtype === 'soft') {
// this.decoder = new AudioDecoderSoft();
// } else if (adtype === 'auto') {
// this.decoder = new AudioDecoderSoft();
// } else {
// throw new Error(`Audio type [${adtype}] not support`);
// }
// this.decoder.on(AudioDecoderEvent.AudioCodecInfo, (codecinfo: AudioCodecInfo) => {
// this.emit(AudioDecoderEvent.AudioCodecInfo, codecinfo);
// })
// this.decoder.on(AudioDecoderEvent.AudioFrame, (AudioFrame: AudioFrame) => {
// this.emit(AudioDecoderEvent.AudioFrame, AudioFrame);
// })
// this.decoder.on(AudioDecoderEvent.Error, (error: ErrorInfo) => {
// this.emit(AudioDecoderEvent.Error, error);
// })
// };
// initialize(): Promise<void>{
// return this.decoder.initialize();
// }
// state(): DecoderState {
// return this.decoder.state();
// }
// configure(config: AudioDecoderConfig): void {
// this.decoder.configure(config);
// }
// decode(packet: AudioPacket): void {
// this.decoder.decode(packet);
// }
// flush(): void {
// this.decoder.flush();
// }
// reset(): void {
// this.decoder.reset();
// }
// close(): void {
// this.decoder.close();
// this.removeAllListeners();
// }
// };