soundfont-player icon indicating copy to clipboard operation
soundfont-player copied to clipboard

Loading soundfont with Angular

Open tjvg91 opened this issue 4 years ago • 0 comments

I tried getting soundfont using Angular. I get this error:

Argument of type 'AudioContext' is not assignable to parameter of type '{ new (contextOptions?: AudioContextOptions): AudioContext; prototype: AudioContext; }'.
  Property 'prototype' is missing in type 'AudioContext' but required in type '{ new (contextOptions?: AudioContextOptions): AudioContext; prototype: AudioContext; }'.

This is my code:

const newPlayer = SoundFont.instrument(new AudioContext(), 'assets/soundfonts/acoustic_grand_piano-mp3.js');

error is in new AudioContext() part

tjvg91 avatar Mar 04 '20 15:03 tjvg91