support http doamin
This commit is contained in:
parent
4407fbd6df
commit
cb5ffadcba
1 changed files with 4 additions and 1 deletions
|
@ -113,7 +113,10 @@ export default class App extends Component {
|
||||||
connect () {
|
connect () {
|
||||||
log('connecting to ws')
|
log('connecting to ws')
|
||||||
|
|
||||||
const endpoint = (`${DOMAIN}/api/streaming`).replace('https', 'wss')
|
const endpoint = `${DOMAIN}/api/streaming`
|
||||||
|
.replace('https', 'wss')
|
||||||
|
.replace('http', 'ws')
|
||||||
|
|
||||||
this.websocket = new WebSocket(endpoint)
|
this.websocket = new WebSocket(endpoint)
|
||||||
|
|
||||||
this.websocket.onopen = () => {
|
this.websocket.onopen = () => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue