Play embedded basic 64 encoded audio in Android web browser

I am trying to play base64 encoded audio embedded in an HTML page from my web view. It is playable in the PC browser, but not in the Android browser. the html page is shown below.

        <!DOCTYPE html>
<html>
<head>
</head>
<body><h1>HTML test  </h1><p>testing  audio</p><`enter code here`audio controls="controls" autobuffer="autobuffer" autoplay="autoplay"><source src="data:audio/mpeg;base64,,SUQzAwAAAAABdlBSSVYAAAAOAABQZWFrVmFsdWUA/38AAFBSSVYAAAARAABBdmVyYWdlTGV2ZWwAICAgI  < Base64 encoded string of mp3 file >   CAgICAgICAgICAgICAg
ICAgICAgICAgICAgDA==" />
</audio></body></html>

      

and this is how i display the html page

 mWebView = (WebView)findViewById(R.id.webview);
 mWebView.loadUrl(HTML_FILE_URL_FOR_WEB_VIEW_TEST);

      

But the sound is not playing in android web browser. Is it possible to do this without using java scripts. any help is appreciated.

+3
html5 html5-audio webview android-webview


source to share


No one has answered this question yet

Check out similar questions:

607
Playing audio with Javascript?
46
Unable to display HTML string
4
How do I get Flowplayer to automatically play Android WebView?
2
playing HTML5 Audio on Android Chrome
2
Audio and video not playing in Android WebView HTML5
1
Android WebChromeClient does not play video but Chrome browser runs on kitkat OS?
1
HTML5 audio tag not working in Android - Chrome when created in JS?
0
Unable to play video using WebView
0
Error while providing HTML5 audio with database encoded URI as source
0
Can't get HTML5 audio to work with my MP3



All Articles
Loading...
X
Show
Funny
Dev
Pics