cordova-plugin-nativeaudio icon indicating copy to clipboard operation
cordova-plugin-nativeaudio copied to clipboard

Loaded successfully but tells loading failed.

Open Domvel opened this issue 6 years ago • 0 comments

This code (executed in app.component.ts (as a provider) in platform.ready method.)

 this.audio.preloadSimple('test', 'assets/snds/test.wav').then(() => {
      console.log('Sound "test.wav" successfully loaded.');
    }).catch(() => {
      console.log('Sound "test.wav" loading failed.');
    });

prints: 'Sound "test.wav" loading failed.' But the sound can successfully played with the audio.play-method. The promise is a lie!

ionic native audio: 4.5.3 cordova native audio: 3.0.9

Domvel avatar Feb 22 '18 18:02 Domvel