()
| 75 | } |
| 76 | |
| 77 | private setupDataChannel(): void { |
| 78 | if (!this.dc) return |
| 79 | this.dc.bufferedAmountLowThreshold = 0 |
| 80 | this.dc.onmessage = (e) => this.eventQueue.enqueue(e.data) |
| 81 | this.dc.onopen = () => this.onOpen() |
| 82 | } |
| 83 | |
| 84 | private handleConnectionStateChange(): void { |
| 85 | if (['closed', 'disconnected', 'failed'].includes(this.pc.connectionState)) { |
no test coverage detected