HTML 使用``和''元素显示音频/视频内容
示例
使用HTML或<audio>元素将视频/音频内容嵌入文档中。视频/音频元素包含一个或多个视频/音频源。要指定源,请使用src属性或<source>元素。浏览器将选择最合适的浏览器。
音频标签示例:
<!-- Simple video example --><video xx_src="videofile.webm" autoplay poster="posterimage.jpg">
Sorry, your browser doesn't support embedded videos,
but don't worry, you can <a href="videofile.webm">download it</a>
and watch it with your favorite video player!
</video>
<!-- Video with subtitles -->
<video xx_src="foo.webm">
<track kind="subtitles" xx_src="foo.en.vtt" srclang="en" label="English">
<track kind="subtitles" xx_src="foo.sv.vtt" srclang="sv" label="Svenska">
</video>
<!-- Simple video example -->
<video width="480" controls poster="https://archive.org/download/WebmVp8Vorbis/webmvp8.gif" >
<source xx_src="https://archive.org/download/WebmVp8Vorbis/webmvp8.webm" type="video/webm">
<source xx_src="https://archive.org/download/WebmVp8Vorbis/webmvp8_512kb.mp4" type="video/mp4">
<source xx_src="https://archive.org/download/WebmVp8Vorbis/webmvp8.ogv" type="video/ogg">
Your browser doesn't support HTML5 video tag.
</video>
音频标签示例:
<!-- Simple audio playback --><audio xx_src="http://developer.mozilla.org/@api/deki/files/2926/=AudioTest_(1).ogg" autoplay>
Your browser does not support the <code>audio</code> element.
</audio>
<!-- Audio playback with captions -->
<audio xx_src="foo.ogg">
<track kind="captions" xx_src="foo.en.vtt" srclang="en" label="English">
<track kind="captions" xx_src="foo.sv.vtt" srclang="sv" label="Svenska">
</audio>
以上是 HTML 使用``和''元素显示音频/视频内容 的全部内容, 来源链接: utcz.com/z/321296.html