这是我的代码:
public class VideoServer extends NanoHTTPD {
public VideoServer() {
super(8080);
}
@Override
public Response serve(IHTTPSession session) {
return responseVideoStream(session, "/home/roroco/Dropbox/video/t.mp4");
}
public Response responseVideoStream(IHTTPSession session, String videopath) {
try {
FileInputStream fis = new FileInputStream(videopath);
return newChunkedResponse(Response.Status.OK, "video/mp4", fis);
} catch (FileNotFoundException e) {
throw new RuntimeException(e);
}
}
}
视频投放成功,但无法前进和后退
查看我的以下gif文件,当我单击时间进度时,视频无法向后显示
答案 0 :(得分:0)