0
votes

W're developing an iPad app (iOS 4.3.5) that uses UIWebView to load YouTube videos. About once in five times a YouTube video will fail to load and I only see the following blank screen with YouTube's logo:

Stuck YouTube load

Looking in the debug logs I can only see the following warnings:

warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3.5 (8L1)/Symbols/System/Library/Internet Plug-Ins/QuickTime Plugin.webplugin/QuickTime Plugin (file not found).
warning: No copy of QuickTime Plugin.webplugin/QuickTime Plugin found locally, reading from memory on remote device.  This may slow down the debug session.

I've read about this warning (https://stackguides.com/questions/7149593/warning-while-playing-a-video-link-in-my-app) and don't think it effects this problem.

Does anyone know how to fix this?

2
Post code for reference.alloc_iNit
We're using this code: <html><head><body style=\"margin:0\"><embed id=\"yt\" src=\"%@\" type=\"application/x-shockwave-flash\"width=\"%0.0f\" height=\"%0.0f\"></embed></body></html> Those variables are passed in from another function. Thanks in advance for any help!moskovich

2 Answers

-1
votes

Try with video tag of HTML 5. I have done the same thing with video tag and its working perfect with my application.

Below is the sample code for the same...

<html><head><video controls=\"controls\"><source src=\"%@\" type=\"video/mp4\" height=\"%0.0f\" width=\"%0.0f\"/></video></body></html>
-1
votes

(Answering my own questions)

OK. I'm pretty sure I figured this out. Some videos don't have a mobile player. You can look at the JSON output here:

http://gdata.youtube.com/feeds/api/videos/TWfph3iNC-k?v=2&alt=jsonc

And here:

http://gdata.youtube.com/feeds/api/videos/cd4jvtAr8JM?v=2&alt=jsonc

Notice how the second video (cd4jvtAr8JM) doesn't have the mobile player link. I guess this means that YouTube hasn't encoded it yet for mobile. Or it's restricted for mobile. Regardless, these type of videos all won't play for me.