0

Hi I have developed an Android application which load Html5 file, that contains .mp3 files. The html files are stored inside the android asset folder. But when I try to load, the file is not playing. This is my path. webView.loadUrl("file:///android_asset/kids_sample/baba.mp3");

user3068659
  • 443
  • 5
  • 14

1 Answers1

1

instead of loading audio files in WebView, load in MediaPlayer class.

and if you really want to load audio files in webView, then you have to code audio files in html file and load that html file in WebView.

example

<html>
<body>

<audio controls>
  <source src="kids_sample/baba.mp3" type="audio/mp3">
Your browser does not support the audio element.
</audio>

</body>
</html>
Learn Pain Less
  • 2,274
  • 1
  • 17
  • 24