开发者

What are some of the advantage (to the user) of using the track element for HTML5?

开发者 https://www.devze.com 2023-03-01 00:40 出处:网络
What advantages does the track ele开发者_如何学运维ment provide to the user?The track element allows the separation of the media element (e.g., a video) from the text track.One advantage of this separ

What advantages does the track ele开发者_如何学运维ment provide to the user?


The track element allows the separation of the media element (e.g., a video) from the text track. One advantage of this separation is the association of multiple tracks with a single video. Depending upon a user selection, the appropriate track could be displayed.

Here's an example of a video with 3 tracks:

<video src="starwars.mp4" type="video/mp4" controls autoplay width="800" height="600">
  <track kind="captions" src="subs/english.srt" srclang="en" label="English Subtitles" default />
  <track kind="captions" src="subs/german.srt" srclang="de" label="German Subtitles" />
  <track kind="captions" src="subs/japanese.srt" srclang="ja" label="Japanese Subtitles" />
</video>
0

精彩评论

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