0

I am novice with html5 video. I chose the http://www.videojs.com/

I can embed following player on my page and it works well when I use extrernal video link:

http://vjs.zencdn.net/v/oceans.mp4

But when I stored following video on disk and wrote following spring controller:

    @RequestMapping(method = RequestMethod.GET, value = "/testVideo")
    @ResponseBody
    public  FileSystemResource testVideo(Principal principal) throws IOException {
        return new FileSystemResource(new File("D:\\oceans.mp4"));

    }

And replace external link with /testVideo I see that I cannot navigate back and forward.

What the problem(http headers are wrong?)? how to fix it?

misterben
  • 7,455
  • 2
  • 26
  • 47
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710

1 Answers1

1

You need to support byte range requests rather than returning the whole file. See this answer for background but I can't speak to how you would implement that in Spring.

Community
  • 1
  • 1
misterben
  • 7,455
  • 2
  • 26
  • 47