django + html视频标签在Safari上破坏了管道

时间:2015-12-30 04:23:18

标签: django html5 video safari

我已经坚持这个问题好几天了。

控制台的输出是:

[30/Dec/2015 04:12:38] "GET /static/home/background.mp4 HTTP/1.1" 200 1772089
[30/Dec/2015 04:12:39] "GET /static/home/background.mov 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
[30/Dec/2015 04:12:39] "GET /static/home/background.mov HTTP/1.1" 500 59
- Broken pipe from ('127.0.0.1', 51895)

我想使用h5视频标签在浏览器上播放视频

<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">
     <source src="{% static "home/background.mov" %}" type="video/quicktime">
     <!-- fallback -->
        <script type="text/javascript">
           QT_WriteOBJECT("{% static "home/background.mov" %}" , '320', '240', '');
     </script>
    </video>
</div>

代码几乎与Apple提供的示例相同。

我已尝试使用Chrome页面,背景视频效果很好。 但是在Safari上,它总是会返回断管。

有人可以帮忙吗?非常感谢。

0 个答案:

没有答案