You've already forked fm-dx-webserver
mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-02-27 06:23:53 +01:00
Fix: audio path is /audio not /audio/
This commit is contained in:
2
index.js
2
index.js
@@ -446,7 +446,7 @@ httpServer.on('upgrade', (request, socket, head) => {
|
||||
wss.emit('connection', ws, request);
|
||||
});
|
||||
});
|
||||
} else if (request.url === '/audio/') {
|
||||
} else if (request.url === '/audio') {
|
||||
proxy.ws(request, socket, head);
|
||||
} else {
|
||||
socket.destroy();
|
||||
|
||||
@@ -71,11 +71,11 @@ var _3LAS = /** @class */ (function () {
|
||||
if (this.WakeLock)
|
||||
this.WakeLock.Begin();
|
||||
try {
|
||||
if (window.location.protocol === 'https:') {
|
||||
this.WebSocket = new WebSocketClient(this.Logger, 'wss://' + this.Settings.SocketHost + ':' + window.location.pathname + 'stream' + 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 + ':' + location.port.toString() + window.location.pathname + 'audio' , 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));
|
||||
else {
|
||||
this.WebSocket = new WebSocketClient(this.Logger, 'ws://' + this.Settings.SocketHost + ':' + location.port.toString() + window.location.pathname + 'audio' , 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("Trying to connect to server.");
|
||||
|
||||
Reference in New Issue
Block a user