webrtc-api example: do not rely on webpack / npm proxying websocket

Instead simply use the desired address directly from the reference
example, this makes it work out of the box without placing expectations
on the web server.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1674>
This commit is contained in:
Mathieu Duponchelle 2024-07-18 19:12:34 +02:00 committed by GStreamer Marge Bot
parent 79657e5671
commit 86039dd5c1
2 changed files with 1 additions and 7 deletions

View file

@ -419,7 +419,7 @@
const signalingProtocol = window.location.protocol.startsWith("https") ? "wss" : "ws";
const gstWebRTCConfig = {
meta: { name: `WebClient-${Date.now()}` },
signalingServerUrl: `${signalingProtocol}://${window.location.host}/webrtc`,
signalingServerUrl: `${signalingProtocol}://${window.location.hostname}:8443`,
};
const api = new GstWebRTCAPI(gstWebRTCConfig);

View file

@ -20,12 +20,6 @@ const config = {
devServer: {
open: true,
static: false,
proxy: {
"/webrtc": {
target: "ws://127.0.0.1:8443",
ws: true
}
},
server: "https",
port: 9090
},