I would like to create a kendo video player.
I would like to pass the video data to the player and not link.
In the back end I use spring.
The problem is that the call response is empty.
Html code:
<div id="video1" style="width:640px; height: 360px;"></div>
Js code:
$("#video1").kendoMediaPlayer({
autoPlay: true,
messages: { play: "Wiedergabe", pause: "Pausieren"},
media: { title: "video",
source: new kendo.data.DataSource({
transport: {
read: { url: "/methodSpring/video", contentType: "application/json", dataType: "json"}}
}),
}
});
Java code:
@RequestMapping(value="video")
public void getVideoGst(HttpServletResponse response) throws Exception
{
logger.debug("+video");
File file = new File("/home/user/Desktop/doc.mp4");
FileInputStream fis = new FileInputStream(file);
try {
IOUtils.copy(fis, response.getOutputStream());
fis.close();
}
finally {
IOUtils.closeQuietly(fis);
logger.debug("+video");
}
}