Why does only youtube embeds work on iPad?

2019-03-26 06:03发布

I am trying to find out as to why youtube embeds works just fine on iPad, and not the embeds of any other video site.

Example of youtube embed:

<object width="640" height="385">
        <param name="movie" value="http://www.youtube.com/v/DlIU5TgwEFg&color1=0xb1b1b1&color2=0xcfcfcf&hl=en_US&feature=player_embedded&fs=1"></param>
        <param name="allowFullScreen" value="true"></param>
        <param name="allowScriptAccess" value="always"></param>
        <embed src="http://www.youtube.com/v/DlIU5TgwEFg&color1=0xb1b1b1&color2=0xcfcfcf&hl=en_US&feature=player_embedded&fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="385"></embed>
</object>

is this because iPad has got a native youtube app which has special support for youtube embeds, or is this something that is handled by the script that's get executed by the youtube embed code, which might check for the user agent, and then load the HTML5 video player with a source pointing to the h.264 encoded version of the video (is something of this sort possible)?

5条回答
Summer. ? 凉城
2楼-- · 2019-03-26 06:40

Youtube links are handled specially in the iPhoneOS.

This is because there is a /System/Library/Internet Plug-Ins/YouTubePlugIn.webplugin to handle these.

HTML5 is irrelevant here.

查看更多
相关推荐>>
3楼-- · 2019-03-26 06:50

YouTube has HTML 5 version (http://www.youtube.com/html5) and iPad doesn't support flash.

查看更多
爱情/是我丢掉的垃圾
4楼-- · 2019-03-26 06:51

You could use something like SWFObject to embed your video with a Flash player, and if it fails, replace that embed with an HTML5 video tag instead.

查看更多
Juvenile、少年°
5楼-- · 2019-03-26 06:54

Latest Iframe embed code is working perfect on iphone.

查看更多
狗以群分
6楼-- · 2019-03-26 07:01

The iPad does not support flash which your embed is. So... I'm guessing youtube is serving a video instead of a flash file in the case of an iPad/iPhone/iWhatever.

查看更多
登录 后发表回答