Skip to content
This repository has been archived by the owner on Oct 28, 2020. It is now read-only.

Commit

Permalink
websocket handshake workaround (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarisia committed Mar 26, 2020
1 parent d31d75f commit 46911ef
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/opus/audio.worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function doConnect(payload) {
ws.close()
} catch (e) {}

ws = new WebSocket("wss://sarisia.cc/stream/")
ws = new WebSocket("wss://aria.gaiji.pro/stream/")
ws.binaryType ="arraybuffer"
ws.onopen = () => {
ws.send(payload.key)
Expand Down
2 changes: 1 addition & 1 deletion src/store/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ export default {
volume: localStorage.volume ? Number(JSON.parse(localStorage.volume)) : 100,
aria: undefined,
ws: undefined,
addr: 'sarisia.cc/player/'
addr: 'aria.gaiji.pro'
}
3 changes: 2 additions & 1 deletion src/webSocket/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export const webSocketCore = function() {
// _connectWs(this, 'wss://sarisia.cc/player/')

this.connectWs = (store, addr) => {
return _connectWs(this, store, `wss://${addr}`)
const cookie = document.cookie
return _connectWs(this, store, `wss://${addr}?${cookie}`)
}

this.sendToSocket = (op, data) => {
Expand Down

0 comments on commit 46911ef

Please sign in to comment.