-->
Save your seat for 纽约流媒体 this May. 现在注册!

HTML 5 and Internet Explorer 9: What We Know, What We Don't

上次我们 探索HTML 5 详细, 特别是视频标签, the jury was out on whether the tag could be implemented with a specific codec: Apple had implemented H.264 in its Safari browser and Google had implemented both H.264和Ogg Theora在Chrome, while both Mozilla Firefox and the Opera browser had settled for Ogg implementation, citing it as the open source video standard. 微软, 就其本身而言, was playing its hand close to the vest, telling the specifications editor of the HTML 5 working group, Ian Hickson, that it had no comment on either the tag or a particular codec.

在MIX 10, 微软's developer's conference that wraps up today in Las Vegas, the company has partially revealed its hand, announcing HTML 5 support for its upcoming Internet Explorer 9 (IE9) browser.

我说部分是因为, even though we know that 微软 is supporting a large portion of the draft HTML 5 specification—joining Apple's Safari, Google's Chrome and Mozilla's Firefox browsers in supporting Cascading Style Sheets 3 (CSS3) and Scalable Vector Graphics (SVG)—we don't yet know other pertinent details, such as which video codec the new IE9 will be using.

Let's look first at what we do know.

兼容性
浏览器天堂的本质, 他们的想法是, is to have content represented the same across any HTML-based browser. As such, most browser vendors have adhered to the Web Standards Project's 酸性测试. Initial indications are that the IE9 browser scores much better on the Acid tests, which measure compatibility with cross-browser HTML code implementation, than any previous version of Internet Explorer. According to 微软, IE9 scores 55% on the Acid3 test, in contract to approximately 20% for IE8. 通过比较, Acid3 scores for Chrome and Safari, based on WebKit implementations, 各占96%左右.

"IE supports CSS3 features such as rounded corners and opacity," one report of the conference stated, "while also now supporting SVG (scalable vector graphics) even though 微软 is pushing its own Silverlight platform for rich graphics."

速度
Acid3 isn't the only test that is used for compatibility; the SunSpider benchmark test is also used for assessing JavaScript speed. IE9 has a markedly improved JavaScript engine, with an almost seven-fold improvement over IE8, which brings it into line with the Firefox 3.浏览器测试版.

Given that IE9 is a preview release, there's a good chance that JavaScript speeds could continue to increase. A part of the magic in the new JavaScript engine, 命名的脉轮, is that it assigns an available core to work on processing the script. This hardware abstraction layer (HAL) allows the browser to take advantage of multiple cores without requiring the JavaScript or HTML programmer to program for a specific processor.

Another HAL that 微软 uses is the graphics processor unit (GPU) as a way to offload graphics rendering from the CPU to the GPU. 微软 calls this GPU-powered-HTML5 and was able to demonstrate smooth graphics and motion, 以及视频播放.

遗留的支持
IE9 will not support Windows XP, as the minimum requirement for IE9 is Vista's Service Pack 2 (SP2).

Support for legacy browsers provides a launching point into the discussion of how HTML 5 video tags are handled, as well as a few possible scenarios around the video codec that 微软 will choose.

What happens when those users who have legacy browsers stumble on a site with HTML 5 video content?

HTML 5 draft spec (March 2010 version) includes two options of ways to handle HTML 5 video tags. Using the term "user agent" to describe the browser, the draft spec notes that content can be embedded within the video element:

"Content may be provided inside the video element,草案中写道, adding "User agents should not show this content to the user; it is intended for older Web browsers which do not support video, so that legacy video plugins can be tried, or to show text to the users of these older browsers informing them of how to access the video contents."

The spec goes on to note that this is not a workaround for addressing accessibility concerns (508a in the U.S.) and suggests that authors are to pre-embed "accessibility aids (such as caption or subtitle tracks, 音频描述轨道, or sign-language overlays) into their media streams."

插件是什么?
Isn't the HTML5 video tag supposed to eliminate the need for video plug-ins?

The answer is a bit convoluted. While it is true that the HTML5 video tag makes it possible to directly embed video clips in web pages, eliminating the need for plug-ins, the specification does not require such, in part because of legacy browser backwards-compatibility requirements.

In fact, in one of the bastions of open source software, the news and opinion site Slashdot.org, says the HAL concept is giving hope to those who see their favorite browsers moving toward H.264 when the users want to use open source codecs.

"There's nothing precluding the browser from using the OS centralized codec repository,Slashdot的一名网友说, "to which a codec can then be added (if not there already). 事实上,Opera 10.50 does just that on Linux (it uses gstreamer). It also uses its own copy of gstreamer on Windows and OS X, to which you can add codecs if you want to."

A second approach that the HTML 5 draft suggests is the use of an external player.

"User agents that cannot render the video may instead make the element represent a link to an external video playback utility or to the video data itself,草案说.

这就引出了第三种选择, 然而, which is not part of the draft spec but has been popular for quite some time and may continue to gain in popularity for those who continue to want to use Flash.

HTML video tag provides the opportunity to offer up multiple versions of a video file, covering the options amongst browsers that have settled on one specific codec. Here is an example of code gleaned from Henrik Sjökvist的网站, in which he offers the third solution:

code

"A downside to this [HTML5 video] approach as opposed to using Flash or another plugin,他说, "is obviously that we currently need to provide three versions of every clip we want to embed (MPEG4, Ogg和FLV). For legacy browsers that don't support [the video tag] we need to use an alternative. An easy solution is to degrade to Flash using SWFObject."

In Sjokvist's version of the HTML5 video playback, 带故障转移到Flash, "the browser detects a video element and attempts to play it. 如果内容无法播放, a JavaScript kicks in and asks for the Flash player to play the video file that is encapsulated within an SWF (Flash-native) object.

微软将使用哪种编解码器?
All this talk about legacy support leads us back around to the question of which codec 微软 will choose to use. My expectation is that they will use H.264 because it is natively supported within Windows 7 as part of the Windows Media Player, 和H完全一样.264 support on Apple's Safari browser takes advantage of QuickTime to access the H.264 codec for playback within Safari on the Mac OS X desktop operating system as well as the iPhone mobile operating system.

So why does the operating system's native support matter? 总而言之,就是分配. H.264 licensing addresses media players but not necessarily browsers.

This presents a conundrum for browser manufacturers that don't have a single desktop operating system to rely on: Do they create one official version of the browser that includes H.264 or do they revert back to plug-ins to insert H.264 after the browser is distributed.

A Slashdot commenter sums up one side of the argument.

“如果火狐有H.264 support, it could not be redistributed. 期.海报上写着. "Everyone would have to download the 'official' version from Mozilla. No Linux distro could include it. No one could change the code and distribute it. 这会削弱火狐."

Another commenter countered with the plug-in option.

"H.264 can be implemented as a plugin," the second commenter stated. "Firefox needn't include this plug-in by default. There are plenty of third-party H.264 implementations to choose from. Mozilla themselves could even create such a plugin as an add-on, and make it freely available (sans source, 如果有必要的话)."

"Mozilla are shooting themselves in the foot,这位评论者继续说道, "if their present stance is anything but bluster. H.264 train is leaving the station, and Apple, Google, and even 微软 are on board."

流媒体覆盖
免费的
合资格订户
现在就订阅 最新一期 过去的问题
相关文章

Track HTML5 Video Viewing with MeFeedia

Tool offers a real-time view of HTML5 engagement across a range of devices.

Commentary: HTML5 Video—Must It Be 免费的?

Now that 微软 has announced HTML5 support, the question remains: Will HTML5 video end up being open source or standards-based?

HTML5的开源解决方案?

Kaltura provides a toolkit for HTML5 embedded video, with a fallback to Flash or Ogg Theora when H.264 isn't available in a user's browser