我使用python -m SimpleHTTPServer
命令调用服务器将文件夹中的文件分享给其他设备。
我尝试使用这种方法流式传输视频/音频(标准的mp4和mp3,大小都不超过20MB)到另一台电脑并且可行(但是终端中会出现以下错误信息)。
奇怪的是,在iPhone/iPad上使用Safari播放视频/音频(除了非常小的mp3文件)失败了。这显然与媒体文件无关,因为我已经在iPhone上使用Apache成功地进行了流式传输。
有任何想法是为什么吗?
Exception happened during processing of request from ('192.168.1.2', 51775)
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock
self.process_request(request, client_address)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 310, in process_request
self.finish_request(request, client_address)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 323, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 641, in __init__
self.finish()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 694, in finish
self.wfile.flush()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe