我通过调用服务器将文件夹中的文件共享给其他设备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