I use reverse proxy to put the stream inside the main HTTP/HTTPS port of my webserver, here is my working code at beginning of client.js :
I think you can remove my "CUSTOM" const and put this trick inside your code for better compatibility.
const CUSTOM = "ReverseProxy";
var port = window.location.port;
if (window.location.protocol == 'https:') {
var protocol = 'wss:'
if (!port) port = '443'
} else {
var protocol = 'ws:'
if (!port) port = '80'
}
startStream('video', 'videostats', protocol+'//'+window.location.hostname+':'+port+'/'+CUSTOM, true, 'auto', 2000)
I use reverse proxy to put the stream inside the main HTTP/HTTPS port of my webserver, here is my working code at beginning of client.js :
I think you can remove my "CUSTOM" const and put this trick inside your code for better compatibility.