How to implement the following voice recording library in angular latest version?

Viewed 185

I am trying to use the following library to record voice audio in angular.

https://github.com/killroywashere/ng-audio-recorder

This is the code sample to use it:

import { NgAudioRecorderService, OutputFormat } from 'ng-audio-recorder';
...

@Component({...})
export class AppComponent {

    constructor(private audioRecorderService: NgAudioRecorderService) {
    
        this.audioRecorderService.recorderError.subscribe(recorderErrorCase => {
            // Handle Error
        })
    }
    
    startRecording() {
        this.audioRecorderService.startRecording();
    }
    
    stopRecording() {
         this.audioRecorderService.stopRecording(outputFormat).then((output) => {
            // do post output steps
         }).catch(errrorCase => {
             // Handle Error
         });
    }
}

The problem is that it doesn't specify what outputFormat and how to playback the audio recording. Can someone help with this?

0 Answers
Related