1

I'm experimenting with NodeJS, and using the following code I can forward an HTTP response to another:

var http = require('http');
var request = require('request');

var server = http.createServer(function(req, res) {
    request("http://asite.poc", function(err, inres, body) {
        res.end(body);
    });
});

server.listen(8000);

When the user makes a request, server gets the response of inner request and forwards it as response to first request. My question is if this is possible for HTML5 video sources by just piping the response of HTTP video stream to the response of another request.

The proposed solution is not quite relevant because it shows how streaming is done from file to network. I want to focus on getting stream from network and redirect it to other network response. I hope that makes it clear.

gfot
  • 95
  • 2
  • 11
  • 1
    This has already been answered in this question: http://stackoverflow.com/questions/24976123/streaming-a-video-file-to-an-html5-video-player-with-node-js-so-that-the-video-c – Daniel Samson Apr 08 '16 at 08:48
  • 1
    What I see in the proposed question is streaming from file to network. I'm talking here about network-to-network. Getting stream from network and forward it to network (other domain) – gfot Apr 08 '16 at 09:27

0 Answers0