I want to play YouTube video in UIWebView
, I followed so many links and I am able to embed videos in UIWebView
but the problem is sometimes it will show the message This video contains contents from Vevo
But I found that whatever iFrame I am using it is working perfectly in browser using firebug
.
This is the iFrame which I using in browser
<iframe id="player" type="text/html" width="320" height="300" src="https://www.youtube.com /embed/w4s6eUZ2uGw?enablejsapi=1&origin=http://example.com" frameborder="0"></iframe>
The same iFrame I am using in iOS device
<iframe id=\"player\" type=\"text/html\" width=\"320\" height=\"300\" src=\"https://www.youtube.com/embed/w4s6eUZ2uGw?enablejsapi=1&origin=http://example.com\" frameborder=\"0\"></iframe>
[self.videoView loadHTMLString:embedHTML baseURL:nil];
Please tell me if I am doing wrong anywhere.
Screen Shot