我正在尝试从外部域获取视频 就像我的标题一样,该视频也存在,并且可以通过浏览器直接下载和观看,但是如果该网址嵌入了播放器,它就会说
“未找到具有支持的格式和MIME类型的视频”
这是一个.mp4视频,我相信我已经使用了正确的代码
<video controls="controls">
<source src="https://example.com/video.mp4" type="video/.mp4" />
</video>
有人知道是什么问题吗?
这是标题信息
HTTP/1.1 200 OK
Server: nginx/1.14.0
Date: Wed, 08 Aug 2018 12:52:42 GMT
Content-Type: video/mp4
Content-Length: 4351091
Last-Modified: Thu, 14 Dec 2017 20:28:10 GMT
Connection: keep-alive
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: HEAD, GET, OPTIONS
Access-Control-Expose-Headers: Content-Range, Date, Etag
Access-Control-Allow-Headers: Content-Type, Origin, Accept, Range, Cache-Control
Access-Control-Max-Age: 1800
Access-Control-Allow-Credentials: true
Timing-Allow-Origin: *
Access-Control-Expose-Headers: Timing-Allow-Origin
ETag: "5a32deda-426473"
Expires: Wed, 08 Aug 2018 14:52:42 GMT
Cache-Control: max-age=7200
Cache-Control: private
Accept-Ranges: bytes
有人可以解释这个问题吗?
答案 0 :(得分:1)
您将类型输入为“ video / .mp4”,将其更改为“ video / mp4”,
<video controls="controls">
<source src="https://example.com/video.mp4" type="video/mp4" />
</video>