Search code examples
uiwebviewmobile-safarihtml5-videoios5

HTML5 video on iOS5 not loading/showing


I have an HTML/JS app running in a webview in an iPad app. The app uses the HTML5 video tag. Videos work fine in iOS4.3 but today I've tested on iOS5 and the videos simply do not show up.

I have verified that it is not a layout related issue by setting background color and borders on the video element.

The same behaviour is evident irrespective of whether the app is run directly in mobile safari /from the home screen or within the webview.

The template for the video is simply:

<video controls src='{url}'></video> //where {url} is substituted at runtime.

The relevant video url plays correctly directly in the mobile Safari on iOS5.

I have tried to proxy the app comms and it seems that it does start loading the video but then stops, no video controls show and only the background color I have set shows thru.

Any ideas would be greatly appreciated. Thanks.


Solution

  • I've fixed this in code by changing the width and height by a pixel once the video element is created. Must invoke a repaint or something to that effect