Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/GStreamer/gst-plugins-good.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJan Schmidt <jan@centricular.com>2018-06-21 15:44:25 +0300
committerTim-Philipp Müller <tim@centricular.com>2020-07-10 18:46:28 +0300
commitb333e32e18daf8a17417bd999592781ffbf07fbe (patch)
tree13ff398e93ae17765cd5e5dc3cc076b9bfbbd267 /tests
parentd9115ef1ebe6980781ccbd9697859ec1dbbc14b4 (diff)
rpicamsrc: webrtc example: Modify HTML to support other ports than 57778
Diffstat (limited to 'tests')
-rw-r--r--tests/examples/rpicamsrc/webrtc-unidirectional-h264.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/examples/rpicamsrc/webrtc-unidirectional-h264.c b/tests/examples/rpicamsrc/webrtc-unidirectional-h264.c
index 775db19e2..9538ede27 100644
--- a/tests/examples/rpicamsrc/webrtc-unidirectional-h264.c
+++ b/tests/examples/rpicamsrc/webrtc-unidirectional-h264.c
@@ -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 \