HTML5视频问题 [英] HTML5 video problem

查看:131
本文介绍了HTML5视频问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道我做错了什么?

i wonder what i'm doing wrong?

<video id="movie" width="320" height="240" preload controls>
  <source src="pr6.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
  <source src="pr6.webm" type='video/webm; codecs="vp8, vorbis"' />
  <source src="pr6.ogv" type='video/ogg; codecs="theora, vorbis"' />
</video>

这段代码的代码在于我的index.html。在同一个目录中,我得到了所有3个视频文件(mp4,webm,ogv)

this peace of code lies in my index.html. in the same directory i got all 3 videofiles (mp4, webm, ogv)

不知何故,视频组件出现,但没有播放视频。一个大X出现在视频组件中。

Somehow the video component shows up, however no video gets played. A big X shows up inside of the video component.

推荐答案

我的猜测是这是之前的问题。如果是这样,答案是:确保您的服务器配置具有以下关联:

My guess is that this is a duplicate of an earlier question. If so, the answer is: Make sure your server config has the following associations:


  • .ogv:video / ogg

  • .oga:audio / ogg

  • .ogg:application / ogg

  • .webm:video / webm

  • .mp4:video / mp4

  • .ogv: video/ogg
  • .oga: audio/ogg
  • .ogg: application/ogg
  • .webm: video/webm
  • .mp4: video/mp4

这篇关于HTML5视频问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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