将youtube视频嵌入桌面和iphone / ipad的网页中 [英] Embedding youtube video in webpage for both desktop and iphone/ipad

查看:502
本文介绍了将youtube视频嵌入桌面和iphone / ipad的网页中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很惊讶我只是把对象嵌入到wordpress博客中,并且意外地它也在ipad上播放。

I'm surprised I just put object to embed youtube in a wordpress blog and surprise it did play also on ipad.

<object width="425" height="344" type="application/x-shockwave-flash" data="http://www.youtube.com/watch?v=hoA1MBRJ_BA&amp;hl=de&amp;fs=1&amp;rel=0"><param name="movie"  value="http://www.youtube.com/watch?v=hoA1MBRJ_BA&amp;hl=de&amp;fs=1&amp;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param></object>

为什么会有效?我以为我需要为Ipad提供一些特殊代码?

Why does it work ? I thought I would need to serve some special code for Ipad ?

我使用了真正的ipad,然后使用Safari和用户代理ipad来获取上面的源代码:怎么能application / x-shockwave-flash被解释为html 5视频?

I have used real ipad and then Safari with user-agent ipad to get the source code above: how can application/x-shockwave-flash be interpreted as html 5 video ?

推荐答案

似乎Ipads和iPhone有一个特殊的插件可以取代Youtube flash嵌入了H264视频链接。所以,在Youtube方面并没有发生什么。此外,它仅适用于Youtube(例如,它不会影响Vimeo flash嵌入)。

It seems Ipads and iPhones have a special plugin that replace Youtube flash embeds with H264 video links. So, on the Youtube side doesn't happen nothing. Also, it only works with Youtube (it does not affect Vimeo flash embeds, for example).

具有讽刺意味的是,在撰写本文时,来自Youtube的新HTML5 iframe嵌入不适用于iPhone,也不适用于iPad,而旧的闪存仍然可以使用。

Ironically, at the time of writing, the new HTML5 iframe embedding from Youtube doesn't work with the iPhone, nor with the iPad, while the old flash embed still does.

是的,这是一个奇怪的世界。

Yes, it's a strange world.

这篇关于将youtube视频嵌入桌面和iphone / ipad的网页中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆