diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2018-03-27 12:46:11 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-27 12:46:11 +0900 |
| commit | 4814ac9d45bcdb0c3d5beaca3a1fd0531be156a6 (patch) | |
| tree | 796d1411235b688f266e69133417b5cf46f0c5ef /src/web/app/common/scripts | |
| parent | Fix bug (diff) | |
| parent | Destory api. subdomain (diff) | |
| download | sharkey-4814ac9d45bcdb0c3d5beaca3a1fd0531be156a6.tar.gz sharkey-4814ac9d45bcdb0c3d5beaca3a1fd0531be156a6.tar.bz2 sharkey-4814ac9d45bcdb0c3d5beaca3a1fd0531be156a6.zip | |
Merge pull request #1312 from syuilo/domain
Domain
Diffstat (limited to 'src/web/app/common/scripts')
| -rw-r--r-- | src/web/app/common/scripts/streaming/stream.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/web/app/common/scripts/streaming/stream.ts b/src/web/app/common/scripts/streaming/stream.ts index cb4041fd89..3912186ad3 100644 --- a/src/web/app/common/scripts/streaming/stream.ts +++ b/src/web/app/common/scripts/streaming/stream.ts @@ -1,7 +1,7 @@ import { EventEmitter } from 'eventemitter3'; import * as uuid from 'uuid'; import * as ReconnectingWebsocket from 'reconnecting-websocket'; -import { apiUrl } from '../../../config'; +import { wsUrl } from '../../../config'; import MiOS from '../../mios'; /** @@ -42,14 +42,13 @@ export default class Connection extends EventEmitter { this.state = 'initializing'; this.buffer = []; - const host = apiUrl.replace('http', 'ws'); const query = params ? Object.keys(params) .map(k => encodeURIComponent(k) + '=' + encodeURIComponent(params[k])) .join('&') : null; - this.socket = new ReconnectingWebsocket(`${host}/${endpoint}${query ? '?' + query : ''}`); + this.socket = new ReconnectingWebsocket(`${wsUrl}/${endpoint}${query ? '?' + query : ''}`); this.socket.addEventListener('open', this.onOpen); this.socket.addEventListener('close', this.onClose); this.socket.addEventListener('message', this.onMessage); |