diff --git a/example_settings.json b/example_settings.json index 83ed2df2..13c5a422 100644 --- a/example_settings.json +++ b/example_settings.json @@ -2,8 +2,8 @@ "webroot": "", "serverroot": "", "accessUrl": "", - "autoJoin": false, - "autoJoinServer": "", - "autoJoinRoom": "", + "autoJoin": true, + "autoJoinServer": "https://v2au1.synclounge.tv", + "autoJoinRoom": "acwacdwacdwawd", "autoJoinPassword": "" } \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index 52061f72..d4019402 100644 --- a/src/App.vue +++ b/src/App.vue @@ -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, diff --git a/src/store/modules/synclounge.js b/src/store/modules/synclounge.js index 903160a6..1d6b34e9 100644 --- a/src/store/modules/synclounge.js +++ b/src/store/modules/synclounge.js @@ -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