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

NativeAudio plugin error on Ionic

Open andreyshedko opened this issue 8 years ago • 0 comments

This is quite simple piece of code, I just need to play sound once on some action. Here is it:

function playSound() {
  $ionicPlatform.ready(function () {
  $cordovaNativeAudio.preloadSimple('timeout', 'audio/timeout.mp3')
 .then(function (msg) { console.log(msg); })
 .catch(function (error) { console.error(error); });
                    });
 $cordovaNativeAudio.play('timeout')
 .then(function (msg) { console.log(msg); })
 .catch(function (error) { console.error(error); });
                }

Unforunately I got error: missing exec: NativeAudio.play and missing exec:NativeAudio.preloadSimple. How should I fix this?

andreyshedko avatar May 24 '16 01:05 andreyshedko