[SOLVED] Playing audio in cordova

I am able to playback mp3 audio with no issues on Chrome using the HTML5 audio tag. However, when I run the same site as an Andriod app created from the F7-CLI the audio doesn’t play.
Does anyone have any suggestions?

FYI, I tried to install the Media plugin but now my app stopped working :frowning:
I installed this: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html
using the following command: framework7 cordova plugin add cordova-plugin-media

Removing the app didn’t fix the app not working.


Nm, the issue is that I needed to use the path for my audio tag as with the relative path from the perspective of the “www” folder:

<audio class="title-music" loop>
    <source src="assets/music/music.mp3" type="audio/mpeg">

Also, the reason why my app stopped working is because I had code which was trying to get the instance of app.views.main.router and it wasn’t initialized yet. So, it was unrelated to adding plugins.