Skip to content

Can I add a video from my filesystem? #2604

Closed Answered by veta666
veta666 asked this question in Q&A
Discussion options

You must be logged in to vote

I was searching for alternatives and I've found it! Leave it here for anyone who would like to use it:

I've made my small server that takes videos from filesystem and sends them with tokio_util::io::ReaderStream.
It's important to give headers (Content-Type and Content-Length) for Response.

This should be corrected on client side:

<video src="http://<server_address>/<path>" type="video/mp4">

http:// is very important event if you just run your server from console.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by veta666
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant