Welcome to the Linux Foundation Forum!

Stream a remote video to the client

The fs.createReadStream(), takses a local path as a parameter. So for streaming a video, that file should already exist on the local storage.

I m wondering, how can we stream a video file, that resides on another server and not on the nodejs server itself.

So the workflow should be:
1. nodejs request a video from an external url
2. more likely it will get the video async
3. then in nodejs side:
a. create a stream. (assumption)
b. pipe it on the response (assumption)

I dont want to implement that solution with a 3rd party application, but with a native nodejs modules. (i mean from the nodejs docs, if it is possible)

Comments

Categories

Upcoming Training