从移动网络应用程序嵌入视频
我一直在寻找有关在移动网站上嵌入视频的信息。我有几个问题:
1) 我知道使用 HTML5 标签适用于 iPhone 和 Android,但是是否有一种特定的方法可以让我为其他设备执行此操作电话?我知道我会很难使用黑莓手机,但是 HTC 手机或 Windows 手机呢?他们在这里会好吗?大多数手机都表示支持 HTML5,那么可以肯定地说支持视频吗?
2)关于像黑莓这样的手机,是否有可能只实现一个播放视频的常规网页(我的bb解决方法总是涉及将页面重新创建为常规网页)。我猜流量播放器是不可能的。有更好的方法吗?我想让尽可能多的手机能够使用该应用程序,因此我将使用这种格式:
if: Android OS/iPhone
- Go to HTML5 Page
else if BB
if version > 5
- Go to HTML5 Page
else
- Go to workaround
else if HTC
- Assuming that html5 will work
else if Opera (for opera Mobi and Mobile)
- Send to HTML5 page
else
- Send to workaround
编辑忘记添加页面关于对 HTML 5 的支持。
I have been looking for information on embedding videos on a mobile website. Here are a few questions I have:
1) I know that using an HTML5 <video>
tag will work with iPhone and Android, but is there a specific way that I should go about doing this for other phones? I know I will struggle with blackberries, but what about HTC phones, or windows phones? Will they be fine here? Most phones say they support HTML5, so is it a safe assumption that videos will be supported?
2) Concerning phones like Blackberries , would it be possible to just implement a regular web page that plays videos (my bb workarounds are always involve recreating the page as a regular web page). I am guessing that flow player is out of the question. Is there a better way to do this? I want to make as many phones able to use the app as possible so I will be using this kind of format:
if: Android OS/iPhone
- Go to HTML5 Page
else if BB
if version > 5
- Go to HTML5 Page
else
- Go to workaround
else if HTC
- Assuming that html5 will work
else if Opera (for opera Mobi and Mobile)
- Send to HTML5 page
else
- Send to workaround
Edit forgot to add the page on support for HTML 5.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
大多数手机/设备实际上将视频播放交给系统媒体播放器(包括 iPhone),其中大多数都能够播放 MP4 或 H.264 的某些变体。我发现使用 DeviceAtlas http://deviceatlas.com/ 或 WURFL http://wurfl.sourceforge.net/ 查找相关设备功能(视频播放器、支持编解码器等),然后提供相关文件/编解码器)和标记(是每个设备的 HTML5 视频标签(或简单的 HREF)通常是最好的(最终也是最简单的)解决方案。
仅供参考 - 某些设备(例如诺基亚 Symbian 设备)支持在网页本身内播放 Flash 视频(FLV/VP6?我相信)(使用 Flash 插件),许多 Android 设备也是如此(尽管取得了不同程度的成功) )。
The majority of phones/devices actually hand-off video playback to the system media player (including the iPhone), most of which are capable of playing some variant of MP4 or H.264. I find using DeviceAtlas http://deviceatlas.com/ or WURFL http://wurfl.sourceforge.net/ to look up the relevant device capabilities (video player, support codecs, etc) and then serve the relevant file/codec(s) and markup (be it an HTML5 video tag, or a simple HREF) to each device is usually the best (and simplest in the end) solution.
FYI - some devices (such as Nokia Symbian devices) support playback of Flash video (FLV/VP6? I believe) within the web page itself (using the Flash plug-in), as do many Android devices (albeit with varying degrees of success).