I'm having an issue embedding youtube videos into my iOS 6.0+ app in a UIWebView. Some of my playlist URLs work while others don't. The ones that don't work simply show a black box in the UIWebView with the appropriate title..but I can't hit play in the UIWebView to start the video.
Example of one that works: http://www.youtube.com/embed/videoseries?list=PLaLpP50ifUEi3z0IXMuc5EbxChfjj0YCX
Doesn't work: http://www.youtube.com/embed/videoseries?list=PLaLpP50ifUEhBzltdYTk63BNyVXx53bvj
However, both load properly in a browser.
My embedded NSString is
NSString *embedHTML =[NSString stringWithFormat:@"\
<html><head>\
<style type=\"text/css\">\
body {\
background-color: transparent;\
color: blue;\
}\
</style>\
</head><body style=\"margin:0\">\
<iframe height=\"200\" width=\"300\" src=\"%@\"></iframe>\
</body></html>", url];
which I populate with the URL using:
[self.webView loadHTMLString:self.embedHTML baseURL:nil];
Why does this work for some playlist videos and not others?
Thanks!