Skip to content

Commit

Permalink
Add option for custom ice servers
Browse files Browse the repository at this point in the history
  • Loading branch information
LuKks committed Feb 5, 2024
1 parent 4ad6c58 commit f5955a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ const safetyCatch = require('safety-catch')
const WebStream = require('./lib/web-stream.js')

// TODO: Investigate how to deploy STUN servers
const iceServers = [
const ICES = [
{ urls: 'stun:stun.l.google.com:19302' }
]

module.exports = class WebPeer {
constructor (relay) {
this._rtc = new RTCPeerConnection({ iceServers })
constructor (relay, opts = {}) {
this._rtc = new RTCPeerConnection({ iceServers: opts.iceServers || ICES })
this._relay = relay
this._mux = Protomux.from(relay)

Expand Down

0 comments on commit f5955a5

Please sign in to comment.