Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48979

Playing audio requires cordova.js in browser

$
0
0

I’m trying to play an audio for all the platforms, but in browser I got the following message:

common.js:284 Native: tried calling NativeAudio.play, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator

The solutions I found in google says that I should use the following comand:

  • ionic cordova run browser

But I’m using Capacitor and it refuses to use the command inside the Capacitor project.

My question is.

Do I need to make another implementation to play audio in browsers or I can just keep things this way and use some kind of command to run this NativeAudio in browsers?

More information:
The library I’m using is: @ionic-native/native-audio/ngx
The method I’mCalling is nativeAudio.play(…)

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48979

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>