I want to stream a video using node js from an on prem video library, not a file system

224 views Asked by At

The exact requirement is like i have an on prem server or api which hosted video. I want to make a request to get that video and stream using node js to my html video tag placed in ui. The video can get through a url. The code i have seen is like streaming from a video saved in local filesystem. But my ask is to get that from a server api and play it in my ui.

1

There are 1 answers

1
Mick On

I think you mean that you want to stream the video as if it were available on your web server, but the video itself is actually on a different web server than your main node JS application.

If so, and if the sever which has the video is available for web requests also, then you can simply provide the absolute URL of the video on the server on which it is hosted - i.e. its full URL and not a URL relative to your node JHS server, which is likely the default for most of your files.

If your problem is that the on premise video library does not have any URI's which are publicly addressable, so you cannot use their URL for web requests, then you may want to look at proxying the requests and responses between the client and the web server.

Its worth mentioning that for a large number of users and/or to provide quality viewer quality and user experience it may be worth using as specialist video streaming server to server the videos.