YouTube在iPad上嵌入了代码 [英] YouTube embed code on iPad

查看:279
本文介绍了YouTube在iPad上嵌入了代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过添加iPad支持来改善网站体验。这包括对视频的支持。我们的客户正在推动用于存储和投放视频的YouTube模式 - 非常适合我们!我最初计划使用YouTube的新HTML5支持< iframe> 片段。这会将设备检测功能卸载到YouTube,并且可以轻松嵌入视频,因为我们无需担心兼容性问题。事实证明我们正在使用的CMS, Sitecore CMS ,剥离< ; iframe> 来自我们的WYSIWYG编辑器。经过大量的研究后,看起来有点难以实现这一点。

I'm working on improving the experience of a site by adding in iPad support. This includes support for videos. Our client is pushing towards a YouTube model for storing and serving videos -- great for us! I originally planned to implement the use of YouTube's new HTML5-supporting <iframe> snippets. This offloads the device detection to YouTube and makes embedding a video a cinch as we don't need to worry about compatibility. It turns out the the CMS we're using, Sitecore CMS, strips out <iframe>'s from our WYSIWYG editor. After a lot of research it looks like its a bit hard to not make this happen.

快进到现在......我测试了旧款< embed> 代码并发现即使iOS不支持Flash,这些嵌入似乎在iPad上运行良好。一些Stack Overflow研究引导我这篇文章这表明它是因为允许播放的iPad上的YouTube插件 / System / Library / Internet Plug-Ins / YouTubePlugIn.webplugin

Fast forward to now... I tested out the old style <embed> code and discovered even though iOS doesn't support Flash, these embeds seem to work fine on iPad. Some Stack Overflow research led me to this post which suggests its because of the YouTube plugin /System/Library/Internet Plug-Ins/YouTubePlugIn.webplugin on iPads that allows for the playback.

我的问题是,有没有文件证明这是确切的原因?我想说明为什么我们可以使用常规< embed> 代码,但我需要通过iOS文档提供证据。默认情况下,每个iPad上都有这个YT插件,或者用户是否需要手动安装?考虑到我们不幸与< iframe> 不兼容,这似乎是一个很好的解决方案,但我需要支持使用< embed> 有很多事实。在此先感谢。

My question is, is there any documentation that this is the exact reason? I'd like to go by this as why we can use the regular <embed> code but I need to back it up with proof via a document for iOS. Is this YT plug-in on every iPad by default, or do users need to manually install it? This seems like a great solution considering our unfortunate incompatibility with an <iframe> but I need to support the use of the <embed>'s with hard facts. Thanks in advance.

推荐答案

您正在寻找的答案可以在Apple的URL Scheme Reference中找到。基本上它是一种在iDevices上发挥作用的机制,用于检测和处理特定类型的URL - 例如谷歌地图,iTunes和YouTube。

The answer you are looking for is to be found in Apple's URL Scheme Reference. Basically it's a mechanism that comes into play on the iDevices to detect and handle specifically, certain types of URLs - for instance Google Maps, iTunes and also YouTube.

这里有一些参考链接。

http://developer.apple.com/library/safari/#featuredarticles/iPhoneURLScheme_Reference/Introduction/Introduction.html#//apple_ref/doc/uid/TP40007899

http://developer.apple.com/library/safari/#featuredarticles/iPhoneURLScheme_Reference/Articles/YouTubeLinks.html#//apple_ref/doc/uid/TP40007895- SW1

还有一个好的方法,你可能还想看看S afari开发人员库,提供有关HTML5视频和音频嵌入的最佳实践建议: - )

And just for good measure, you might also want to take a look at the Safari Developer Library for the best practice recommendations on HTML5 Video and Audio embedding :-)

这篇关于YouTube在iPad上嵌入了代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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