rpicamsrc: webrtc example: Modify HTML to support other ports than 57778

This commit is contained in:
Jan Schmidt 2018-06-21 22:44:25 +10:00 committed by Tim-Philipp Müller
parent d9115ef1eb
commit b333e32e18

View file

@ -132,10 +132,13 @@ const gchar *html_source = " \n \
\n \
\n \
function playStream(videoElement, hostname, port, path, configuration, reportErrorCB) { \n \
var wsHost = (hostname != undefined) ? hostname : window.location.hostname; \n \
var wsPort = (port != undefined) ? port : 57778; \n \
var l = window.location;\n \
var wsHost = (hostname != undefined) ? hostname : l.hostname; \n \
var wsPort = (port != undefined) ? port : l.port; \n \
var wsPath = (path != undefined) ? path : \"ws\"; \n \
var wsUrl = \"ws://\" + wsHost + \":\" + wsPort + \"/\" + wsPath; \n \
if (wsPort) \n\
wsPort = \":\" + wsPort; \n\
var wsUrl = \"ws://\" + wsHost + wsPort + \"/\" + wsPath; \n \
\n \
html5VideoElement = videoElement; \n \
webrtcConfiguration = configuration; \n \