AudioRecorderService

The AudioRecorderService can record an audio file, the SDK uses this to record a voice message

Hierarchy

  • MultimediaRecorder<Omit<AudioRecording, keyof MediaRecording>>

    AudioRecorderService

Properties

config

config: MediaRecorderConfig

Due to browser restrictions the following config is used:

  • In Safari we record in audio/mp4
  • For all other browsers we use audio/webm (which is then transcoded to wav)

Overrides

MultimediaRecorder.config

Defined in

projects/stream-chat-angular/src/lib/voice-recorder/audio-recorder.service.ts:23

Methods

pause

pause(): void

Pause audio recording, it can be restarted using resume

Returns

void

Overrides

MultimediaRecorder.pause

Defined in

projects/stream-chat-angular/src/lib/voice-recorder/audio-recorder.service.ts:61


resume

resume(): void

Resume a previously paused recording

Returns

void

Overrides

MultimediaRecorder.resume

Defined in

projects/stream-chat-angular/src/lib/voice-recorder/audio-recorder.service.ts:72


start

start(): Promise<void>

Start audio recording

Returns

Promise<void>

Overrides

MultimediaRecorder.start

Defined in

projects/stream-chat-angular/src/lib/voice-recorder/audio-recorder.service.ts:48


stop

stop(options?): Promise<MediaRecording & Omit<AudioRecording, keyof MediaRecording>>

Stop the recording and free up used resources

Parameters

NameTypeDescription
options?Object
options.cancelbooleanif this is true no recording will be created, but resources will be freed

Returns

Promise<MediaRecording & Omit<AudioRecording, keyof MediaRecording>>

the recording

Overrides

MultimediaRecorder.stop

Defined in

projects/stream-chat-angular/src/lib/voice-recorder/audio-recorder.service.ts:86

© Getstream.io, Inc. All Rights Reserved.