We can use WebRtc stream Api for your application. Instead of using the internal HTTP server, it is easy to display a WebRTC stream in a HTML page served by another HTTP server. The URL of the webrtc-streamer to use should be given creating the WebRtcStreamer instance :
The code will be like
var webRtcServer = new WebRtcStreamer(<video tag>, <webrtc-streamer url>, <request interface>);
waiting for your reply. I hope I will get the chance to work in your project.