Web three-piece set (experience stickers) in Google, the video tag plays mkv video files

video tag to play mkv video files

the first time:

<embed src="咏春.mkv" hidden="no"  loop="true" Repeat="true" playcount="true" autostart="autoplay">

No, if the tab is opened with Google, the video will be downloaded. . .

the second time:

 <video  width="320" height="240" controls>
                <source src="咏春.mkv" type="video/mkv">
                <source src="movie.ogg" type="video/ogg">
                您的浏览器不支持 video 标签。//播放失败则显示
            </video>

Keep going in circles. Can't play.
Insert picture description here

the third time

<video src="咏春.mkv"></video>

Insert picture description here
A cover art appears, but it cannot be played. The reason is that the controls attribute is not added.

Fourth success

Need to add src="file" in the video

 <video src="咏春.mkv" width="320" height="240" controls>
                <source src="咏春.mkv" type="video/mkv">
                <source src="movie.ogg" type="video/ogg">
                您的浏览器不支持 video 标签。//播放失败则显示
            </video>

Insert picture description here
Insert picture description here

To summarize the tags about the video:

  • bgsound is a label used to play background music, but it is out of date. Many browsers do not support auto play, and this tag is not recommended.
<bgsound src=""> </bgsound>
&lt;!&ndash;该特性是非标准的,请尽量不要在生产环境中使用它!&ndash;&gt;-->
<!--不要使用它!想要在网页中嵌入音频,应当使用<audio>.-->
  • The audio tag is a new tag in HTML 5. <audio>Tags define sounds, such as music or other audio streams. controls: If this property appears, it will display controls to the user, such as a play button.
    Currently, <audio>there are 3 file formats supported by Element: MP3, Wav, and Ogg.
    Insert picture description here
<audio src="someaudio.wav">
您的浏览器不支持 audio 标签。
</audio>
<!-- <audio> src="李清照艺术系列_风之琳.mp3" id="audio1" hidden="false" autoplay="autoplay" loop="true" controls >
&lt;!&ndash;autoplay属性在chrome中无效)chrome浏览器在184月起,就在桌面浏览器全面禁止了音视频的自动播放功能。不光是这样,
在页面加载完毕的情况下,用户没有click、dbclick、touch等主动交互行为,使用js直接调用.play() 方法的话,chrome都会抛出如下错误:&ndash;&gt;

</audio>-->
  • embed tags in all major browsers support <embed>tabs.
    Now do not recommend the use of <embed>labels, you can use <img>、<iframe>、<video>、<audio>the tag in place and so on.
嵌入图片:
<embed type="image/jpg" src="https://static.runoob.com/images/runoob-logo.png" width="258" height="39">

嵌入 HTML 页面:
<embed type="text/html" src="snippet.html" width="500" height="200">
嵌入视频:
<embed type="video/webm" src="video.mp4" width="400" height="300">
  • <video> 标签定义视频,比如电影片段或其他视频流。<video> 标签是 HTML 5 的新标签。You can place text content between the <video>and </video>tags, so that browsers that do not support the element can display the tag's information.
    Insert picture description here

Guess you like

Origin blog.csdn.net/qq_44861675/article/details/108209822