排版引擎比较 (HTML5媒体)

本页使用了标题或全文手工转换
维基百科,自由的百科全书

HTML5规范定义了几个标签,允许在语义上原生包含视频和音频。下表比较了排版引擎之间对这一规范各个方面的支持。

表格说明

引擎命名

這裡使用後端的引擎名而不是瀏覽器的名稱。使用各瀏覽器引擎的瀏覽器如下表所示。

排版引擎 发行版本 預覽版本 使用
Amaya 11.4.7[1] 不適用 停止开发;Amaya
Blink 537.36 源代码[注 1] Chromium/Chrome(28+)、Opera(15+)、YandexMicrosoft Edge(新版)
EdgeHTML 13.10586 [2] 不適用 Microsoft Edge(舊版)、通用Windows平台 (UWP)JavaScript应用
Gecko
標準版77.0.1(2018年8月8日,​5年前​(2018-08-08[3]
延長支持版(ESR)68.9.0(2018年6月26日,​5年前​(2018-06-26[4]


Beta及开发者版125.0b4[5]在维基数据编辑(2024年3月25日)
Nightly126.0a1[6]在维基数据编辑(2024年3月18日)
所有Mozilla软件,包括FirefoxSeaMonkeyGaleonCaminoK-MeleonFlock(至2.x版本);Debian IceWeaselGNU IceCat(前身为GNU IceWeasel);CyberfoxIcedoveIceapeIceowlFirefox for mobile("Fennec")
KHTML 4.12.3[7] 不適用 Konqueror[注 2]
Presto 2.12.388 不適用 停止开发;OperaOpera Mobile现在使用Blink;任天堂DS & DSi浏览器Internet Channel
Tasman (Mac版IE 5.2.3) 不適用 2003年停止开发;Mac OS XInternet Explorer 5以上
Trident 7.0(IE 11) 不適用 Internet Explorer与其他Internet Explorer shellMaxthon(仅限Microsoft Windows操作系统)、Windows Phone 8
WebKit 534.20 每日构建[注 3] Tizen(OS与浏览器)、Safari(桌面与移动版)、Google Chrome(28版本之前)、Maxthon 3Shiira, iCab 4OmniWeb 5.5+、WebAdobe AIRMidori, Adobe Dreamweaver CS4CS5Android浏览器、Palm webOS浏览器、Symbian S60浏览器、OWB英语Origyn Web BrowserSteamRekonqAroraFlock (版本3以上)、RockMelt海豚浏览器SleipnirKonqueror[注 2]
  1. ^ chromium / chromium/blink. chromium.googlesource.com. Google. [2014-05-27]. 
  2. ^ 2.0 2.1 在Konqueror中,用户可以切换排版引擎。
  3. ^ WebKit Nightly Builds. webkit.org. [2014-05-27]. 


取值

以下各格的顏色表示該排版引擎的最新版本或指定版本(如果给出版本号的话)對該功能的支援程度。没有取值的版本號表示该排版引擎首次完全支援該功能。

取值 含义
表示該排版引擎完全地支援該功能或元素。
表示該功能或元素尚未有支援。
部份 表示該功能或元素有實作進展,但並不支援所有取值,對於已支援的取值,該實作是正確的。
不正確 表示該功能或元素有實作進展,但是實作並非在所有情況都是正確無誤的。
實驗性質 表示該功能或元素有實作進展,但是使用另外的屬性或元素名(瀏覽器前輟)。多半是不完全實作或是有過多的漏洞
抛弃 表示该属性/元素不再受到支持。
每日构建 表示該功能或元素在未釋出的版本有某種程度的支援。預期將有完整支援。
依情況 表示该属性/元素仅在某些平台支持或设定在某些配置后支持。

元素属性

媒体元素允许在标签中直接设置某些属性

Trident Gecko WebKit Presto
<audio>属性
src 5.0[t 1] 1.9.1 525 2.5
preload 2.0[note 1][g 1] 實驗性質[note 1]
autoplay 1.9.1 2.5
loop 11.0[g 2]
controls 1.9.1
<video>属性
src 5.0[t 1] 1.9.1 525 2.5
preload 2.0[note 1][g 1] 實驗性質[note 1]
autoplay 1.9.1 2.5
loop 11.0[g 2]
controls 1.9.1
poster 1.9.2[g 3]
width 1.9.1
height
<source>属性
src 5.0[t 1] 1.9.1 525[w 1] 2.5
type
media 15.0[g 4]
<track>属性
kind 6.0[t 2] 24.0[g 5] [w 2]
label
src
srclang

DOM属性

与媒体元素有关的一些属性包含在DOM中。

Trident Gecko WebKit Presto[p 1]
错误状态
MediaError 5.0 [t 3] 1.9.1 ? 2.5
网络状态
src 5.0[t 1] 1.9.1 ? 2.5
currentSrc
networkState
preload 2.0[note 1][g 1]
buffered 2.0[g 6]
load() 1.9.1 2.5
canPlayType() 533[w 3]
就绪状态
readyState 5.0[t 1] 1.9.1 ? 2.5
seeking
回放状态
currentTime 5.0[t 1] 1.9.1 ? 2.5
startTime
duration 1.9.1
paused
defaultPlaybackRate 20.0[g 7]
playbackRate
played 15.0[g 8]
seekable 8.0[g 9]
ended 1.9.1 2.5
autoplay
loop 11.0[g 2]
play() 1.9.1
pause()
控制
controls 5.0[t 1] 1.9.1 ? 2.5
volume
muted

DOM事件

媒体元素引入新的事件处理仅适用于那些元素的情况,如暂停/恢复。

Trident Gecko[g 10] WebKit Presto
loadstart 5.0[t 4] 1.9.1 ? ?
progress
suspend 1.9.2
abort 1.9.1
error
emptied
stalled 8.0[g 11]
play 1.9.1
pause
loadedmetadata
loadeddata
waiting
playing
canplay 1.9.1
canplaythrough
seeking
seeked
timeupdate
ended
ratechange
durationchange
volumechange

视频格式支持

Trident Gecko WebKit Presto
Ogg Theora 手动安装[note 2] 1.9.1[g 12] 依情況[note 3] 2.5
H.264 5.0[t 6] 33.0[8][g 13] 依赖(525)[note 3][w 9] 依情況[note 4]
WebM VP8 手动安装[note 2] 2.0[g 14][g 15] 依赖(534)[w 10] 2.6.30[p 3][p 4][p 5]

音频格式支持

Trident Gecko WebKit Presto
Ogg Vorbis 手动安装[note 2] 1.9.1[g 12] 依情況[note 3] 2.5
WAV PCM 525[note 3] 2.0
MP3 5.0[t 7] [g 16] 依情況[note 4]
AAC
Speex 手动安装[note 2] [g 17] 依情況[note 3]
Opus IE 12 ?? [g 18] 15.0[g 19] 依情況[note 3]

注释

  1. ^ 1.0 1.1 1.2 1.3 1.4 preload以旧名字autobuffer支持。
  2. ^ 2.0 2.1 2.2 2.3 Google为多媒体应用库发布了一个WebM组件以允许WebM文件在IE9中通过标准HTML5<video>标签播放[t 5]Xiph.org分发了OpenCodecs包,其修正了Google的基于DirectShow的VP8解码器。VLC多媒体播放器附带有“网页插件”,从而使VLC从<video><audio>标签中播放多媒体,让其支持所有VLC支持的格式。
  3. ^ 3.0 3.1 3.2 3.3 3.4 3.5 在Mac OS X下WebKit支持QuickTime[w 4],默认情况下,其支持H.264、MP3、AAC和WAV PCM格式,如果安装了XiphQT等第三方编解码器则会额外支持Ogg Theora与Vorbis格式。Google Chrome支持Theora、Vorbis、WebM与MP3格式[w 5]。Chromium可以被编译以支持任意FFmpeg支持的格式,并可以选择是否支持诸如H.264和MP3的专利格式[w 6]MorphOS上的Origyn网页浏览器也采用FFmpeg播放HTML5媒体内容。[w 7][w 8]
  4. ^ 4.0 4.1 在Linux与FreeBSD上,Presto 2.5使用GStreamer库的系统版本,并且可以播放任何GStreamer支持的格式(包括H.264、MP3、AAC等, 前提是已安装解码器) 。在其他平台上,它只支持Ogg Theora格式的视频和Ogg Vorbis与WAVE PCM的音频。[p 2]

参考

  1. ^ Amaya Binary Releases, Most recent download link in stable
  2. ^ Change log between EdgeHTML 12.10240 and 13.10586
  3. ^ Firefox 77.0.1, See All New Features, Updates and Fixes. mozilla.org. Mozilla基金會. 2020-06-03. 
  4. ^ Firefox ESR 68.9.0, See All New Features, Updates and Fixes. mozilla.org. Mozilla基金會. 2020-06-02. 
  5. ^ Index of /pub/firefox/releases/125.0b4/. 2024年3月25日 [2024年3月25日] (英語). 
  6. ^ Firefox Nightly 126.0a1, See All New Features, Updates and Fixes. 2024年3月18日 [2024年3月19日] (英語). 
  7. ^ Download for kdelibs, Most recent download link in stable
  8. ^ via OpenH264

Trident参考

  1. ^ 1.0 1.1 1.2 1.3 1.4 1.5 1.6 Internet Explorer Platform Preview Guide for Developers, Microsoft, [2016-02-06], (原始内容存档于2014-03-12) 
  2. ^ track element - track object (Internet Explorer). Microsoft. [12 July 2013]. (原始内容存档于2013-07-15). 
  3. ^ MSDN HTMLMediaError Object for Internet Explorer 9, Microsoft, [2016-02-06], (原始内容存档于2017-05-28) 
  4. ^ video object. Microsoft. [12 July 2013]. (原始内容存档于2016-03-14). 
  5. ^ Jazayeri, Mike, More about the Chrome HTML Video Codec Change, Google, 2011-01-14 [2016-02-06], (原始内容存档于2012-10-03) 
  6. ^ McCracken, Harry, Microsoft Previews the Revamped Internet Explorer 9 Platform, Technologizer, 2010-03-16 [2016-02-06], (原始内容存档于2021-02-28) 
  7. ^ Branscombe, Mary, Microsoft previews Internet Explorer 9, TechRadar UK, 2010-03-16, (原始内容存档于2010-03-22) 

Gecko参考

  1. ^ 1.0 1.1 1.2 Bug 548523 - HTML 5 media attribute 'autobuffer' has been renamed to 'preload', Mozilla, [2016-02-06], (原始内容存档于2021-03-08) 
  2. ^ 2.0 2.1 2.2 Bug 449157 - Implement the looping attributes in media elements, Mozilla, [2016-02-06], (原始内容存档于2021-03-08) 
  3. ^ Bug 449156 - Implement the poster attribute for the <video> element, Mozilla, [2016-02-06], (原始内容存档于2021-01-24) 
  4. ^ Bug 449363 - Support media attribute of <source> elements, Mozilla, [2016-02-06], (原始内容存档于2021-03-08) 
  5. ^ Bug 629350 - Implement the track element, Mozilla, [2016-02-06], (原始内容存档于2019-04-02) 
  6. ^ Bug 462957 - Implement nsIDOMHTMLMediaElement::GetBuffered(), Mozilla, [2016-02-06], (原始内容存档于2021-03-07) 
  7. ^ Bug 495040 - Implement playbackRate, Mozilla, [2016-02-06], (原始内容存档于2021-03-08) 
  8. ^ Bug 462959 - Implement nsIDOMHTMLMediaElement::GetPlayed(), Mozilla, [2016-02-06], (原始内容存档于2021-03-08) 
  9. ^ Bug 462960 - Implement nsIDOMHTMLMediaElement::GetSeekable(), Mozilla, [2016-02-06], (原始内容存档于2021-03-07) 
  10. ^ Using audio and video in Firefox - Media events, Mozilla, [2016-02-06], (原始内容存档于2012-05-08) 
  11. ^ Bug 481082 - Video controls should listen for |stalled| event, Mozilla, [2016-02-06], (原始内容存档于2021-03-08) 
  12. ^ 12.0 12.1 Shepherd, Eric, Media formats supported by the audio and video elements, Mozilla, 2010-01-28 [2009-10-11], (原始内容存档于2012年5月4日) 
  13. ^ Bug 799318 - [meta] Support H.264/AAC/MP3 video/audio playback on desktop Firefox, Mozilla, [2016-02-06], (原始内容存档于2021-02-24) 
  14. ^ Bug 566243 - Merge mozilla-webmedia repository to mozilla-central, Mozilla, [2016-02-06], (原始内容存档于2021-02-24) 
  15. ^ Firefox WebM Builds, Mozilla, [2016-02-06], (原始内容存档于2010-06-08) 
  16. ^ Bug 562730 - Reproducing Mp3 files with html5, Mozilla, [2016-02-06], (原始内容存档于2021-03-07) 
  17. ^ Bug 476752 - support the speex voice codec in <audio> and <video> elements, Mozilla, [2016-02-06], (原始内容存档于2021-03-08) 
  18. ^ Bringing Interoperable Real-Time Communications to the Web, Skype, [2016-02-06], (原始内容存档于2016-08-09) 
  19. ^ Bug 674225 - support the Opus voice codec in <audio> and <video> elements, Mozilla, [2016-02-06], (原始内容存档于2020-11-11) 

WebKit参考

  1. ^ Pfeiffer, Silvia, [whatwg] Quality Values for Media Source Elements, 2009-12-13, (原始内容存档于2011-07-19) 
  2. ^ April 2012 HTML5 Media Element & WebAudio – WebKit, [2016-02-06], (原始内容存档于2021-03-08) 
  3. ^ Bug 24364 - Add HTMLMediaElement canPlayType method, WebKit, [2016-02-06], (原始内容存档于2021-03-08) 
  4. ^ Koivisto, Antti, HTML5 Media Support, WebKit, 2007-11-12 [2016-02-06], (原始内容存档于2021-09-04) 
  5. ^ Look for "GOOGLE_CHROME_BUILD", [2016-02-06], (原始内容存档于2021-02-25) 
  6. ^ DiBona, Chris, [whatwg] Google's use of FFmpeg in Chromium and Chrome Was: Re: MPEG-1 subset proposal for HTML5 video codec, Google, 2009-06-01, (原始内容存档于2011-07-19) 
  7. ^ Origyn Web Browser for MorphOS, Fabian Coeurjoly, [2010-01-04], (原始内容存档于2010-03-17) 
  8. ^ Holwerda, Thom, Origyn Web Browser 1.7 Supports HTML5 Media, More, OSNews, 2010-03-08 [2010-03-08], (原始内容存档于2010-03-12) 
  9. ^ HTML Video Codec Support in Chrome, [2010-01-22], (原始内容存档于2011-06-21) 
  10. ^ Bankoski, Jim, WebM and VP8 land in Chromium, Google, 2010-05-19 [2016-02-06], (原始内容存档于2010-05-21) 

Presto参考

  1. ^ Pieters, Simon, Everything you need to know about HTML5 video and audio, Opera, 2010-03-10 [2016-02-06], (原始内容存档于2014-03-29) 
  2. ^ Jägenstedt, Philip, (re-)Introducing <video>, Opera, 2009-12-31, (原始内容存档于2010-01-04) 
  3. ^ Lie, Håkon Wium, Welcome, WebM <video>!, Opera, 2010-05-19, (原始内容存档于2011-03-21) 
  4. ^ Mills, Chris, Opera supports the WebM video format, Opera, 2010-05-19 [2016-02-06], (原始内容存档于2011-04-05) 
  5. ^ Kleinhout, Huib, Opera 10.60 goes final, Opera, 2010-07-01, (原始内容存档于2010-07-02) 

外部链接