drogonframework / drogonframework/drogon

How to allow seeking of download video file ?

Open
#2,261 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
14.3k
Forks
1.4k
Avg merge
1d 13h
Merged PRs (30d)
14

Description

I am serving mp4 video files from Drogon like this :

```cpp
drogon::app().registerHandler(
"/static/{1}",
[](const drogon::HttpRequestPtr &req,
std::function &&cb,
std::string fileName) {
auto filePath = "./" + fileName;
auto resp = drogon::HttpResponse::newFileResponse(filePath);
cb(resp);
});
```

The problem is I cannot seek forward or backward (except for the very beginning) of the video file. If I want to fast forward to 30 seconds I need to wait that the video plays.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.