Skip to content

Commit 3ef41e4

Browse files
Merge pull request #38 from dan-tw/custom-frontend
Change how the signalling URL is built
2 parents bd8d18e + 967079f commit 3ef41e4

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

library/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

library/src/SPSApplication.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,13 @@ export class SPSApplication extends Application {
5454

5555
enforceSpecialSignallingServerUrl() {
5656
// SPS needs a special /ws added to the signalling server url so K8s can distinguish it
57-
this.stream.setSignallingUrlBuilder(()=> {
57+
this.stream.setSignallingUrlBuilder(() => {
58+
59+
// get the current signalling url
5860
let signallingUrl = this.stream.config.getTextSettingValue(TextParameters.SignallingServerUrl);
5961

60-
if (signallingUrl && signallingUrl !== undefined && !signallingUrl.endsWith("/ws")) {
61-
signallingUrl = signallingUrl.endsWith("/") ? signallingUrl + "ws" : signallingUrl + window.location.pathname + "/ws";
62-
}
62+
// add our 'ws' token to the end dependant on whether the URL ends with a '/' or not
63+
signallingUrl = signallingUrl.endsWith("/") ? signallingUrl + "signalling" + window.location.pathname : signallingUrl + "/signalling" + window.location.pathname;
6364

6465
return signallingUrl
6566
});

0 commit comments

Comments
 (0)