Merge pull request #263 from nogamenofun98/main

Changed how the _config in AssistManager construct
This commit is contained in:
Mehdi Osman 2021-12-29 16:22:51 +03:00 committed by GitHub
commit 236db3eb7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,12 +147,13 @@ export default class AssistManager {
return;
}
this.setStatus(ConnectionStatus.Connecting)
const urlObject = new URL(window.ENV.API_EDP)
import('peerjs').then(({ default: Peer }) => {
const _config = {
// @ts-ignore
host: new URL(window.ENV.API_EDP).host,
host: urlObject.hostname,
path: '/assist',
port: location.protocol === 'https:' ? 443 : 80,
port: urlObject.port === "" ? location.protocol === 'https:' ? 443 : 80 : urlObject.port,
}
if (this.config) {