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
user1653781
source
to share
No one has answered this question yet
Check out similar questions:
607
46
4
2
2
1
1
0
0
0