How to use opus-recorder - 6 common examples

To help you get started, we’ve selected a few opus-recorder examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kvdi / kvdi / ui / app / src / lib / audioManager.js View on Github external
startRecording () {
    // build a config for the OpusRecorder
    const config = {
      encoderPath: encoderPath,
      encoderApplication: 2048,
      streamPages: true  // Receive every frame in real time
    }

    // create the media recorder
    this._mediaRecorder = new Recorder(config)
    this._mediaRecorder.ondataavailable = (data) => {
      this._send(data)
    }

    // start the media recorder.
    this._mediaRecorder.start()
      .then(() => { console.log('Started audio recorder')})
      .catch((err) => {
        const serr = new Error(`Failed to start audio recording: ${err}`)
        this.emit(Events.error, serr)
      })
  }
github MicroPad / Web / app / src / react-web / components / note-viewer / elements / RecordingElementComponent.tsx View on Github external
constructor(props: IFileElementComponent) {
		super(props);

		this.canRecord = Recorder.isRecordingSupported();
		try {
			this.recorder = new Recorder({
				encoderPath: '/assets/recorder/encoderWorker.min.js'
			});
		} catch (err) {
			console.warn('Recording is not supported');
			this.canRecord = false;
		}
	}
github MicroPad / Web / src / webV3 / src / components / note-viewer / elements / RecordingElementComponent.tsx View on Github external
constructor(props: IFileElementComponent) {
		super(props);

		this.canRecord = Recorder.isRecordingSupported();
		try {
			this.recorder = new Recorder({
				encoderPath: '/assets/recorder/encoderWorker.min.js'
			});
		} catch (err) {
			console.warn('Recording is not supported');
			this.canRecord = false;
		}
	}
github MicroPad / Web / src / webV3 / src / components / note-viewer / elements / RecordingElementComponent.tsx View on Github external
constructor(props: IFileElementComponent) {
		super(props);

		this.canRecord = Recorder.isRecordingSupported();
		try {
			this.recorder = new Recorder({
				encoderPath: '/assets/recorder/encoderWorker.min.js'
			});
		} catch (err) {
			console.warn('Recording is not supported');
			this.canRecord = false;
		}
	}
github MicroPad / Web / app / src / react-web / components / note-viewer / elements / RecordingElementComponent.tsx View on Github external
constructor(props: IFileElementComponent) {
		super(props);

		this.canRecord = Recorder.isRecordingSupported();
		try {
			this.recorder = new Recorder({
				encoderPath: '/assets/recorder/encoderWorker.min.js'
			});
		} catch (err) {
			console.warn('Recording is not supported');
			this.canRecord = false;
		}
	}

opus-recorder

A library for recording opus encoded audio

MIT
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis

Popular opus-recorder functions