support http doamin

This commit is contained in:
slice 2018-07-18 11:51:00 -07:00
parent 4407fbd6df
commit cb5ffadcba
No known key found for this signature in database
GPG Key ID: 1508C19D7436A26D
1 changed files with 4 additions and 1 deletions

View File

@ -113,7 +113,10 @@ export default class App extends Component {
connect () {
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.onopen = () => {