Since the release of iOS9, we can render local HTML with a wkWebView
using loadFileURL:allowingReadAccessToURL:
This looks good so far, but we are having problems playing a local mp3 from within the HTML.
There is an <audio>
tag with a src
attribute with a relative path to the mp3 file.
The iOS9-Simulator plays our mp3 correctly, but physical devices don't. Catching the error with JavaScript shows a networkState NETWORK_NO_SOURCE
, which does not make sense to us...
Using an http URL as src
and streaming the mp3 from the web works fine.
Has anybody managed to play local audio files with a wkWebView
?