【发布时间】:2020-06-24 08:56:04
【问题描述】:
这是我的代码:
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,当我点击时间进度时,视频不能倒退
【问题讨论】: