bump dependency versions
This commit is contained in:
parent
417cbf49c7
commit
a8fa279201
2 changed files with 5 additions and 4 deletions
|
@ -5,5 +5,5 @@ authors = ["Tangent 128 <Tangent128@gmail.com>"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bytes = "0.4"
|
bytes = "0.4"
|
||||||
futures = "0.1.14"
|
futures = "0.1.20"
|
||||||
hyper = "0.11.2"
|
hyper = "0.11.24"
|
||||||
|
|
|
@ -28,14 +28,15 @@ impl Service for WebmServer {
|
||||||
fn call(&self, req: Request) -> Self::Future {
|
fn call(&self, req: Request) -> Self::Future {
|
||||||
let response = match (req.method(), req.path()) {
|
let response = match (req.method(), req.path()) {
|
||||||
(&Get, "/loop") => {
|
(&Get, "/loop") => {
|
||||||
let stream: BodyStream<Vec<u8>> = parse_webm(SRC_FILE).into_iter().chunk_webm()
|
let stream: BodyStream<Vec<u8>> = Box::new(
|
||||||
|
parse_webm(SRC_FILE).into_iter().chunk_webm()
|
||||||
.chain(parse_webm(SRC_FILE).into_iter().chunk_webm())
|
.chain(parse_webm(SRC_FILE).into_iter().chunk_webm())
|
||||||
.fix_timecodes()
|
.fix_timecodes()
|
||||||
.map_err(|err| match err {
|
.map_err(|err| match err {
|
||||||
ChunkingError::IoError(io_err) => hyper::Error::Io(io_err),
|
ChunkingError::IoError(io_err) => hyper::Error::Io(io_err),
|
||||||
ChunkingError::OtherError(_) => hyper::Error::Incomplete
|
ChunkingError::OtherError(_) => hyper::Error::Incomplete
|
||||||
})
|
})
|
||||||
.boxed();
|
);
|
||||||
Response::new()
|
Response::new()
|
||||||
.with_header(ContentType("video/webm".parse().unwrap()))
|
.with_header(ContentType("video/webm".parse().unwrap()))
|
||||||
.with_body(stream)
|
.with_body(stream)
|
||||||
|
|
Loading…
Reference in a new issue