How to use the nativescript-audio.TNSRecorder function in nativescript-audio

To help you get started, we’ve selected a few nativescript-audio 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 nstudio / nativescript-audio / demo / app / main-view-model.ts View on Github external
constructor(page: Page) {
    super();
    this._player = new TNSPlayer();
    this._player.debug = true; // set true for tns_player logs

    this._recorder = new TNSRecorder();
    this._recorder.debug = true; // set true for tns_recorder logs

    this.currentVolume = 1;
    this._slider = page.getViewById('volumeSlider') as Slider;

    // Set player volume
    if (this._slider) {
      this._slider.on('valueChange', (data: any) => {
        this._player.volume = this._slider.value / 100;
      });
    }
  }

nativescript-audio

NativeScript plugin to record and play audio.

MIT
Latest version published 3 years ago

Package Health Score

52 / 100
Full package analysis