Home Manual Reference Source
import Recorder from 'itslanguage/WebAudio/Recorder.js'
public class | source

Recorder

Extends:

AudioContext → Recorder

Recorder Simple Audio Recorder based on Web Audio API technology.

This audio recorder tries to capture audio in WAV format with some defaults that should work best.

If this does not supply in your case, build your own recorder!

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
Private Members
private
private
private
private
private

stream: *

Method Summary

Public Methods
public

async createStream()

public

getAudioSpecs(): {"audioFormat": *, "audioParameters": *}

public

async startRecording()

public

Inherited Summary

From class AudioContext
public

Private object to hold AudioContext node.

public

This will be the error function.

public

This will be the log function.

private

Keep a list of all registered event listeners.

public

addEventListener(args: ...*)

Wraps the addEventListener which is available on the AudioContext node.

public

Get the audio context or create one.

public

fireEvent(eventName: string, data: Object)

Use this method to conveniently fire an event.

public
public

removeEventListener(args: ...*)

Wraps the removeEventListener which is available on the AudioContext node.

public

Resume a suspended AudioContext.

public

Suspend the AudioContext to preserve power and such.

Public Constructors

public constructor() source

Construct the Player.

Override:

AudioContext#constructor

Public Members

public mediaStreamSource: * source

Private Members

private audioFormat: * source

private channels: * source

private sampleRate: * source

private sampleWidth: * source

private stream: * source

Public Methods

public async createStream() source

public getAudioSpecs(): {"audioFormat": *, "audioParameters": *} source

Return:

{"audioFormat": *, "audioParameters": *}

public async startRecording() source

public stopRecording() source