theDuncs
theDuncs

Reputation: 4843

Youtube embed html for uiwebview not working (on iOS 4.2 iPhone 3G)

I have a UIWebView with the following embed code in it:

<embed id="yt" src="http://www.youtube.com/watch?v=1T6YM7RE5wQ" type="application/x-shockwave-flash" width="280" height="186"></embed>

This works fine on my iPhone 4 (iOS 4.3) but when testing on an iPhone 3G (iOS 4.2), the fullscreen youtube player appears, but stalls/hangs on "Loading Movie..."

Should I be using a different embed code for 4.2? Should I be using a different embed code altogether?

Any advice much appreciated.

Thanks guys.

dunc

Upvotes: 2

Views: 1972

Answers (1)

Jensen2k
Jensen2k

Reputation: 8408

Try this instead:

<iframe id="yt" class="youtube-player" type="text/html" width="280" height="186" src="http://www.youtube.com/embed/1T6YM7RE5wQ" frameborder="0">

It's using the HTML5-video element instead of referring to the flash.

Upvotes: 1

Related Questions