2
Ich möchte Video-Datei streamen, anstatt es herunterzuladen. Ich habe es mit dem folgenden Code versucht. Aber es wird heruntergeladen.Anstatt Download, streamen Videodatei mit Jersey
@GET
@Path("video")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
public Response video() {
File file = new File("/home/lvaddi/Downloads/demoVideoFile.flv");
ResponseBuilder response = Response.ok(file, MediaType.APPLICATION_OCTET_STREAM);
response.header("Content-Disposition", "filename=videofile.flv");
return response.build();
}