Can't play audio in Android device -
i want make :
<audio controls> <source src="media/blablabla.mp3" type="audio/mpeg"></source> </audio>
i run app on local host :8080/console , worked (the music can played). when run apps on device, music can't played.
my device os android 4.1.2
see question answer: ibm worklight 6.1 - unable play local media file using cordova
copy-paste of answer:
... playing local media file, need provide full path media file's location where it'll in generated android project. example, if create
common\audio
folder in worklight application , place .mp3 file in it, need use following path (in html or javascript, or you'd like...):<a href="#" onclick="playaudio('/android_asset/www/default/audio/mymediafile.mp3');">play audio</a>
sample project: android cordova media api
Comments
Post a Comment