LoginSignup
0
0

More than 1 year has passed since last update.

Ktorで動画をシークしたい

Posted at

Ktorで動画をシークしたい

最初作ったときに動画がシークできなくて悩んだ

多分 Accept-Range が必要

routing{
    route("videos"){
        route("{id}"){
            get {
                call.response.header("Accept-Range","bytes")
                call.respond(LocalFileContent(File("path/to/video")))
            }
        }
    }
}

これであってるのかはわからないけど、とりあえず動いた。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0