亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

directory search
Attributes accesskey (attribute) class (attribute) contenteditable (attribute) contextmenu (attribute) data-* (attribute) dir (attribute) draggable (attribute) dropzone (attribute) Global attributes hidden (attribute) id (attribute) itemid (attribute) itemprop (attribute) itemref (attribute) itemscope (attribute) itemtype (attribute) lang (attribute) slot (attribute) spellcheck (attribute) style (attribute) tabindex (attribute) title (attribute) translate (attribute) Elements a abbr address area article aside audio b base bdi bdo blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 head header hr html i iframe img input input type="button" input type="checkbox" input type="color" input type="date" input type="datetime"-local input type="email" input type="file" input type="hidden" input type="image" input type="month" input type="number" input type="password" input type="radio" input type="range" input type="reset" input type="search" input type="submit" input type="tel" input type="text" input type="time" input type="url" input type="week" ins kbd label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt rtc ruby s samp script section select slot small source span strong style sub summary sup table tbody td template textarea tfoot th thead time title tr track u ul var video wbr Miscellaneous Attributes Block-level elements CORS enabled image CORS settings attributes Element Inline elements Kinds of HTML content Link types Microdata Optimizing your pages for speculative parsing Preloading content Reference Supported media formats Using the application cache Obsolete acronym applet basefont big blink center command content dir element font frame frameset hgroup image input type="datetime" isindex keygen listing marquee nextid noframes plaintext strike tt xmp
characters

HTML 元素作為媒體元素的子和。它允許您指定定時(shí)文本軌道(或基于時(shí)間的數(shù)據(jù)),例如自動(dòng)處理字幕。曲目格式為WebVTT格式(文件) - 網(wǎng)絡(luò)視頻文本曲目。<track> <audio><video>.vtt

內(nèi)容類(lèi)別

沒(méi)有

允許的內(nèi)容

沒(méi)有,這是一個(gè)空的元素。

標(biāo)記遺漏

由于它是空白元素,所以開(kāi)始標(biāo)記必須存在,并且結(jié)束標(biāo)記不得存在。

允許 parents

媒體元素,在任何流內(nèi)容之前。

允許ARIA角色

沒(méi)有

DOM界面

HTMLTrackElement

屬性

該元素包含全局屬性。

default屬性表示應(yīng)該啟用該軌道,除非用戶的偏好指示另一個(gè)軌道更合適。這只能用于track每個(gè)媒體元素的一個(gè)元素。kind文本軌道是如何使用的。如果省略,則默認(rèn)類(lèi)型為subtitles。如果該屬性不存在,它將使用屬性subtitles。如果屬性包含無(wú)效值,它將使用metadata。(52之前版本的Chrome將無(wú)效值視為subtitles。)允許使用以下關(guān)鍵字:

  • subtitles

    • 字幕提供翻譯觀眾無(wú)法理解的內(nèi)容。例如在英語(yǔ)電影中不是英語(yǔ)的對(duì)話或文本。

    • 字幕可能包含額外的內(nèi)容,通常是額外的背景信息。例如,“星球大戰(zhàn)”電影開(kāi)頭的文字,或場(chǎng)景的日期,時(shí)間和地點(diǎn)。

  • captions

    • 隱藏式字幕提供了一個(gè)轉(zhuǎn)錄,可能還包括音頻的翻譯。

    • 它可能包含重要的非語(yǔ)言信息,如音樂(lè)提示或音效。它可能指示提示的來(lái)源(例如音樂(lè),文字,字符)。

    • 適用于聾啞人或聲音靜音的用戶。

  • descriptions

    • 視頻內(nèi)容的文字描述。

    • 適合盲人或無(wú)法看到視頻的用戶。

  • chapters

    • 章節(jié)標(biāo)題旨在用戶在瀏覽媒體資源時(shí)使用。

  • metadata

    • 腳本使用的軌道。對(duì)用戶不可見(jiàn)。

label列出可用文本軌道時(shí)瀏覽器使用的文本軌道的用戶可讀標(biāo)題。src曲目地址(.vtt文件)。必須是有效的網(wǎng)址。這個(gè)屬性必須被定義。srclang軌道文本數(shù)據(jù)的語(yǔ)言。它必須是有效的BCP 47語(yǔ)言標(biāo)簽。如果kind屬性設(shè)置為subtitles,srclang必須定義。

使用說(shuō)明

數(shù)據(jù)的類(lèi)型   track添加到介質(zhì)被設(shè)置在所述kind屬性,這可能需要subtitles,captions,descriptions,chaptersmetadata的值。元素指向一個(gè)源文件,其中包含瀏覽器在用戶請(qǐng)求附加數(shù)據(jù)時(shí)公開(kāi)的定時(shí)文本。

media元素不能有一個(gè)以上track具有相同kind,srclanglabel。

例子

<video controls poster="/images/sample.gif">   
    <source src="sample.mp4" type="video/mp4">   
    <source src="sample.ogv" type="video/ogv">   
    <track kind="captions" src="sampleCaptions.vtt" srclang="en">   
    <track kind="descriptions" src="sampleDescriptions.vtt" srclang="en">   
    <track kind="chapters" src="sampleChapters.vtt" srclang="en">   
    <track kind="subtitles" src="sampleSubtitles_de.vtt" srclang="de">   
    <track kind="subtitles" src="sampleSubtitles_en.vtt" srclang="en">   
    <track kind="subtitles" src="sampleSubtitles_ja.vtt" srclang="ja">   
    <track kind="subtitles" src="sampleSubtitles_oz.vtt" srclang="oz">   
    <track kind="metadata" src="keyStage1.vtt" srclang="en" label="Key Stage 1">   
    <track kind="metadata" src="keyStage2.vtt" srclang="en" label="Key Stage 2">   
    <track kind="metadata" src="keyStage3.vtt" srclang="en" label="Key Stage 3">   
    <!-- Fallback -->   ...
</video>

規(guī)格

規(guī)范

狀態(tài)

評(píng)論

WHATWG HTML規(guī)范該標(biāo)準(zhǔn)中“軌道元素”的定義。

Living Standard


HTML5規(guī)范“軌道元素”的定義。

Recommendation

初始定義

瀏覽器兼容性

Feature

Chrome

Edge

Firefox (Gecko)

Internet Explorer

Opera

Safari

Basic support

23

(Yes)

24 (24)2

10

12.10

6

src attribute settable

?

(Yes)

50 (50)3

?

?

?

Invalid kind value as metadata

No support

?

No support

No support

No support

No support

Feature

Android

Edge

Firefox Mobile (Gecko)

IE Mobile

Opera Mobile

Safari Mobile

Basic support

251

(Yes)

24.0 (24)2

No support

No support

No support

src attribute settable

?

(Yes)

50.0 (50)3

No support

No support

No support

Invalid kind value as metadata

No support

?

No support

No support

No support

No support

1. 在Chrome for Android中,<track>元素尚不適用于全屏視頻。

2 .<track>元素,HTMLTrackElement接口和相關(guān)的API在首選項(xiàng)后面的Firefox 24中實(shí)現(xiàn),media.webvtt.enabled默認(rèn)情況下它是禁用的。要啟用WebVTT支持,請(qǐng)將此首選項(xiàng)設(shè)置為true。WebVTT在Firefox 31中默認(rèn)啟用,可以通過(guò)將首選項(xiàng)設(shè)置為禁用false

3. 在Firefox 50之前,src屬性是可設(shè)置的,但更改無(wú)法正確處理。從Firefox 50開(kāi)始,現(xiàn)有軌道數(shù)據(jù)已妥善處理,新軌道數(shù)據(jù)已加載并生效等等。

Previous article: Next article: