HTML5 audio not playing in PhoneGap App


If you have set all the attributes and audio source correctly, then this can be a security issue.

Add the following in your index.html.

<meta http-equiv="Content-Security-Policy" content="default-src 'self'
   http://appvipswi.easwi.it; script-src 'self' 'unsafe-inline'; media-src 'self'">

Set the AndroidManifest.xml as

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />

karthikeya Boyini
karthikeya Boyini

I love programming (: That's all I know

Updated on: 29-Jan-2020

131 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements