开发者

Embedding Videos from Mobile Web App

开发者 https://www.devze.com 2023-03-23 09:50 出处:网络
I have been looking for information on embedding videos on a mobile website. Here are a few questions I have:

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.


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).

0

精彩评论

暂无评论...
验证码 换一张
取 消