我的视频代码有问题吗?

发布于 2024-09-24 13:09:22 字数 363 浏览 0 评论 0原文

<div id="div1" style="position: absolute; top: 0px; left: 0px;">
  <video width="320" height="240" controls="controls">
    <source src="C:\Users\Trent Terrill\Desktop\Website Stuff\Media\video.ogg" type="video/ogg"/>
     Your browser does not support the video tag.
  </video>
</div>

它在任何浏览器中都不起作用。

<div id="div1" style="position: absolute; top: 0px; left: 0px;">
  <video width="320" height="240" controls="controls">
    <source src="C:\Users\Trent Terrill\Desktop\Website Stuff\Media\video.ogg" type="video/ogg"/>
     Your browser does not support the video tag.
  </video>
</div>

It won't work in any browser.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

遗弃M 2024-10-01 13:09:22
  • 首先,...

    <块引用>

    controls 属性是一个布尔属性。如果存在,则表明作者没有提供脚本控制器,并且希望用户代理提供自己的一组控件。

    (参见http://www.w3.org /TR/html5/video.html#attr-media-controls)

  • 第二...

    使用“Windows 风格”路径,例如

    src="C:\Users\Trent Terrill\Desktop\Website Stuff\Media\video.ogg"
    

    可能是浏览器的问题。尝试设置本地网络服务器(例如 Apache)并将您的路径转换为 ​​URL。

  • First, ...

    The controls attribute is a boolean attribute. If present, it indicates that the author has not provided a scripted controller and would like the user agent to provide its own set of controls.

    (See http://www.w3.org/TR/html5/video.html#attr-media-controls)

  • Second ...

    Using a "Windows-style" path like

    src="C:\Users\Trent Terrill\Desktop\Website Stuff\Media\video.ogg"
    

    could be a problem for the browser. Try to setup a local webserver (e.g. Apache) and convert your path to a URL.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文