Archived
2
0

potential fix for #25

This commit is contained in:
Craig
2020-02-10 07:13:40 +00:00
parent f422db4eb5
commit 3d1341cfe1
6 changed files with 74 additions and 23 deletions

View File

@ -151,9 +151,7 @@ export abstract class BaseClient extends EventEmitter<BaseEvents> {
return
}
this._peer = new RTCPeerConnection({
iceServers: [{ urls: 'stun:stun.l.google.com:19302' }],
})
this._peer = new RTCPeerConnection()
this._peer.onicecandidate = event => {
if (event.candidate === null && this._peer!.localDescription) {
@ -167,9 +165,18 @@ export abstract class BaseClient extends EventEmitter<BaseEvents> {
}
}
this._peer.onsignalingstatechange = event => {
this.emit('debug', `peer signal state chagned: ${this._peer!.signalingState}`)
}
this._peer.onconnectionstatechange = event => {
this.emit('debug', `peer connection state chagned: ${this._peer!.connectionState}`)
}
this._peer.oniceconnectionstatechange = event => {
this._state = this._peer!.iceConnectionState
this.emit('debug', `peer connection state chagned: ${this._state}`)
this.emit('debug', `peer ice connection state chagned: ${this._peer!.iceConnectionState}`)
switch (this._state) {
case 'checking':

View File

@ -1,6 +1,7 @@
const path = require('path')
module.exports = {
productionSourceMap: false,
css: {
loaderOptions: {
sass: {