我需要从 samba 服务器流式传输视频,并且我使用 nanohttpd 在我的项目中创建简单的服务器。当我使用本地文件中的 fileinputstream 时,视频视图可以按设置播放视频"http://localhost:8080"
public class Server extends NanoHTTPD {
public Server() {
super(8080);
}
@Override
public Response serve(String uri, Method method,
Map<String, String> header, Map<String, String> parameters,
Map<String, String> files) {
fis = new FileInputStream(filePath);
return new NanoHTTPD.Response(Status.OK,"video/mp4", fis);
}
}
JCIFS没有fileinputstream,所以当我改变时我只得到smbfileinputstream
fis = new SmbFile(filePath,auth).getInputStream();
它不起作用,我需要知道 fileinputstream 和 smbfileinputsteam 之间有什么不同,以便我可以从 samba 流式传输视频......
如果您有其他在 Android 上从 samba 流式传输视频的解决方案,请帮助我...
多谢..