我刚在本地提供静态视频,并在视频标签中播放。
在Chrome上,它运行正常。
但在Safari上,它会返回
[24/Dec/2015 02:44:21] "GET /static/home/background.mp4 HTTP/1.1" 200 286720
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py", line 86, in run
self.finish_response()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py", line 128, in finish_response
self.write(data)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py", line 217, in write
self._write(data)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 328, in write
self.flush()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 307, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 41] Protocol wrong type for socket
[24/Dec/2015 02:44:21] "GET /static/home/background.mp4 HTTP/1.1" 500 59
- Broken pipe from ('127.0.0.1', 50378)
我的html代码很简单,如下所示,
<!DOCTYPE html>
<html>
{% load staticfiles %}
<head>
<link rel="stylesheet" type="text/css" href= "{% static "home/home.css" %}" />
<link href='https://fonts.googleapis.com/css?family=Passero+One' rel='stylesheet' type='text/css'/>
<style>
@font-face {
font-family: homefont;
src: local(Sohoma_Light_Condensed.ttf) format('truetype');
}
div {
font-family: homefont;
}
</style>
<title>
Kidy Vision
</title>
</head>
<body>
<div class="menu-wrap">
<nav class="menu">
<ul class="clearfix">
<li class="current-item"><a href="#">Home</a></li>
<li>
<a href="#">Photography</a>
<ul class="sub-menu">
<li><a href="#">Gallery</a></li>
<li><a href="#">Artists</a></li>
</ul>
</li>
<li>
<a href="#">Computer Vision</a>
<ul class= "sub-menu">
<li><a href="#">Project</a> </li>
</ul>
</li>
<li><a href="#">Photos</a></li>
<li><a href="#">Site Help</a></li>
</ul>
</nav>
</div>
<div class="fullscreen-bg">
<video loop muted autoplay poster="{% static "home/body.png" %}" class="fullscreen-bg__video">
<source src="{% static "home/background.mp4" %}" type="video/mp4">
</video>
</div>
<div class="tagline">
<nh></nh> Art˙Technology˙Life
</div>
视频播放在&#34;全屏-bg&#34; div类。有人可以帮忙吗?