UIWebView not showing videos on iPhone 5/iPad 4 only

I've encountered a very strange issue with UIWebView.


If I load a web page with an embedded video stream ("m3u8" format) in UIWebView this works fine under iOS 9 and older and also under iOS 10 on all devices, except on iPhone 5 and iPad 4. So it does not work on the oldest devices which are still supported by iOS 10 - which are IMHO also the only 32 bit devices which are still supported. The video is never played, no image at all, just a blck box where the video is supposed to be. I've analyzed the network traffic (via Charles) and I could see that there are requests for all the video fragments on the IPhone 5, so UIWebView did actually download the video data, but it does not play the video.


But static mp4 videos do work fine on the iPhone 5 under iOS 10.



The issue is even more strange: in a very simple test app with no code, just a storyboard with the UIWebView, the video does even work under iOS 10 on an iPhone 5. But in my "normal" App the same does not work, I've even added a new UIWebView without any delegate or any other connection to the rest of the App: the video is not played.



Static mp4 videos:

- Work on all devices under all iOS releases


Video-Streams (normal App):

- Work on all devices under iOS 7/8/9

- Work on iPhone 5s and newer and iPad Air and newer under IOS 10.

- Do not work on iPhone 5 and iPad 4 under iOS 10.


Video-Streams (simple App):

- Work on all devices under all iOS releases


So I would be interested what exactly could prevent UIWebView to play video streams (m3u8)? There's no direct connection of the UIWebView to the rest of the App, nevertheles it does not work. I thought the avaiable memory could be an issue, but an iPhone 5s does not have more RAM, so this should be not an issue. Then I thought, the general performace could be an issue, but the CPU usage of the App itself is below 1 %, and when I tap the "play" button the CPU usage is about 27%, which is probably just the "loading spinner" that is shown by UIWebView.


Any ideas what's happening here? Are there any secret side effects of other iOS components which could affect UIWebView on these old devices?

Replies

Have you tried using WKWebView rather than WebView?

Is there any update on this issue? We are facing exactly the same problem and cannot switch to WKWebview too. Strangely, the issue appears on iPad 4 especially since iOS release 10.2.

No solution yet. The affected devices seems to be only those with 32 Bit processor (iPhone 5/5c, iPad 4). All newer devices (these have all 64 Bit procesors) do work fine. So there seems to be a pattern, but unfortunately no solution.

We have solved this issue by adding:


UIWebview: mediaPlaybackRequiresUserAction = false;

Thanks, this helped me as well!