You've already forked fm-dx-webserver
mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-02-26 22:13:53 +01:00
Merge pull request #18 from bkram/Bkram/ssl-detection-for-proxied-stream
On https use /stream/ path instead of the audio port
This commit is contained in:
@@ -71,7 +71,12 @@ var _3LAS = /** @class */ (function () {
|
|||||||
if (this.WakeLock)
|
if (this.WakeLock)
|
||||||
this.WakeLock.Begin();
|
this.WakeLock.Begin();
|
||||||
try {
|
try {
|
||||||
this.WebSocket = new WebSocketClient(this.Logger, 'ws://' + this.Settings.SocketHost + ':' + this.Settings.SocketPort.toString() + this.Settings.SocketPath, this.OnSocketError.bind(this), this.OnSocketConnect.bind(this), this.OnSocketDataReady.bind(this), this.OnSocketDisconnect.bind(this));
|
if (window.location.protocol === 'https:') {
|
||||||
|
this.WebSocket = new WebSocketClient(this.Logger, 'wss://' + this.Settings.SocketHost + ':' + '/stream' + this.Settings.SocketPath, this.OnSocketError.bind(this), this.OnSocketConnect.bind(this), this.OnSocketDataReady.bind(this), this.OnSocketDisconnect.bind(this));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.WebSocket = new WebSocketClient(this.Logger, 'ws://' + this.Settings.SocketHost + ':' + this.Settings.SocketPort.toString() + this.Settings.SocketPath, this.OnSocketError.bind(this), this.OnSocketConnect.bind(this), this.OnSocketDataReady.bind(this), this.OnSocketDisconnect.bind(this));
|
||||||
|
}
|
||||||
this.Logger.Log("Init of WebSocketClient succeeded");
|
this.Logger.Log("Init of WebSocketClient succeeded");
|
||||||
this.Logger.Log("Trying to connect to server.");
|
this.Logger.Log("Trying to connect to server.");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user