Custom serverRoot fix

This commit is contained in:
Sam 2018-07-20 22:07:34 +10:00
parent 86c60e501f
commit 31468b414c
3 changed files with 8 additions and 12 deletions

View File

@ -2,8 +2,8 @@
"webroot": "",
"serverroot": "",
"accessUrl": "",
"autoJoin": false,
"autoJoinServer": "",
"autoJoinRoom": "",
"autoJoin": true,
"autoJoinServer": "https://v2au1.synclounge.tv",
"autoJoinRoom": "acwacdwacdwawd",
"autoJoinPassword": ""
}

View File

@ -196,8 +196,8 @@ export default {
console.log('Login failed', e)
return this.$router.push('/signin')
}
console.log('Settings', settings)
if (settings.autoJoin) {
console.log('Autojoining...')
await this.$store.dispatch('autoJoin', {
server: settings.autoJoinServer,
password: settings.autoJoinPassword,

View File

@ -117,17 +117,13 @@ export default {
state._socket.disconnect()
}
console.log('Socket attempt connect on ' + address)
const getLocation = (href) => {
var l = document.createElement('a')
l.href = href
return l
}
let addr = getLocation(address)
console.debug(addr.pathname)
let path = address.split('/')[3] || ''
address = address.replace(path, '')
console.log('Pathname', path)
state._socket = state._io.connect(address, {
'forceNew': true,
'connect timeout': 7000,
path: addr.pathname + '/socket.io'
path: '/' + path + '/socket.io'
})
state._socket.on('connect', function (result) {
// Good connection