0

I have WebView that is supposed to play some audio tags from webpages it is showing with similar code like this:

     <audio preload="auto" 
    data-reactid="main.5.1.0x" 
src="blob:https%3A//www.lsdfsdf.com/584b1e6d-47a6-4a58-a7d4-e5e7633c32a8">
    </audio>

It seems it loads the audio but then doesn't play it. On a next click it loads again but then doesn't play it. I am now not sure if the loading doesn't work since it is a blob url or a permission issue with the WebView itself.

When I open the same webpage in a browser, everything works fine.

SunnySonic
  • 1,318
  • 11
  • 37
  • Yes, it is the problem of object url. "These URLs can only be used locally in the single instance of the browser and in the same session" see [What is blob url](http://stackoverflow.com/questions/30864573/what-is-blob-url-why-it-is-used-explain) – Elvis Xia - MSFT Apr 19 '16 at 02:19
  • @ElvisXia. The url is being used locally. It is being generated dynamically by the webpage. In the browser the same is working fine, but not in the webview. Therefor I am looking for a solution to play the audio. – SunnySonic Apr 21 '16 at 21:22
  • I got confused. If the url is generated locally and in the same session. It should in format of "blob:584b1e6d-47a6-4a58-a7d4-e5e7633c32a8". Please check my demo:[Blob Sample](https://github.com/elvisxia/BlobSample). – Elvis Xia - MSFT Apr 22 '16 at 01:27
  • Thank you @ElvisXia . I have no control over the content. It has been created already. It is a webpage, opening it in the browser results in audio tags working fine, opening it in a webview not. I would like to know what to do to make it work in a webview and if not, why... – SunnySonic Apr 23 '16 at 14:13

0 Answers0