Why HTML5 video doesn't play in IOS 8 WebApp(webview)?
Solution 1:
Video playback is broken on standalone applications in IOS 8.0.2
Solution 2:
Looks like iOS 8.3 fixes this issue. I have a standalone web app that uses an audio element, and it's working as expected now. FINALLY!
Solution 3:
Confirming
Packaged cordova App cannot load video
Added:
<preference name="AllowInlineMediaPlayback" value="true"/>
to config.xml
and
webkit-playsinline
to the video
element.
The UI says video is Loading
, while video.networkStatus
remains 2
(NETWORK_LOADING
) and video.readyState
0
(HAVE_NOTHING
)
Safari playback works
Home screen launcher playback does not work
For the same webapp that worked in ios Safari, the homescreen version does not play videos either, and crashes the webapp when trying to change the source of the video
.
I don't like apple :|
Solution 4:
I have two apps that use HTML5 video. One stopped working, the other not. There were two differences:
- The one that still works added the source tags to the video tag AFTER adding the video tag to the DOM.
- The app that still works has autoplay set to false (
<video autoplay="false">...</video>
)
The first one made no difference, the second one made the app work again.