如何在HTML视频标签中打开.mov格式的视频? [英] How to open .mov format video in HTML video Tag?

查看:12826
本文介绍了如何在HTML视频标签中打开.mov格式的视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想像这样播放.mov视频,但视频无法在任何浏览器中播放。

I want to play .mov video like as this, but video doesn't play in any browser.

<video width="400" controls Autoplay=autoplay>
  <source src="D:/mov1.mov" type="video/mov">
</video>


推荐答案

而不是使用<来源> 代码,使用< src> 属性< video> ,如下所示你会看到这个动作。

Instead of using <source> tag, use <src> attribute of <video> as below and you will see the action.

<video width="320" height="240" src="mov1.mov"></video>

您可以提供多个标签在标签内,每个都有不同的视频源。浏览器将自动浏览列表并选择能够播放的第一个列表。例如:

you can give multiple tags within the tag, each with a different video source. The browser will automatically go through the list and pick the first one it’s able to play. For example:

<video id="sampleMovie" width="640" height="360" preload controls>
    <source src="HTML5Sample_H264.mov" />
    <source src="HTML5Sample_Ogg.ogv" />
    <source src="HTML5Sample_WebM.webm" />
</video>

如果您在Chrome中测试该代码,您将获得H.264视频。不过在Firefox中运行它,你会在同一个地方看到Ogg视频。

If you test that code in Chrome, you’ll get the H.264 video. Run it in Firefox, though, and you’ll see the Ogg video in the same place.

这篇关于如何在HTML视频标签中打开.mov格式的视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆