Skip to content

Commit

Permalink
Fix session initalization
Browse files Browse the repository at this point in the history
  • Loading branch information
janlelis committed Jun 21, 2020
1 parent 8e395bb commit d527dfa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/views/Room.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,17 @@ export default {
this.catchInvalidRoomId(roomId)
const sessionConfig = {
roomId,
webSocketAddress: config.env.rtcUrl || config.defaultRtcUrl,
stun: config.env.stunUrl || config.defaultStunUrl,
joinTimeout: config.defaultJoinTimeout,
}
if (config.env.turnUrl) { sessionConfig.turn = config.env.turnUrl }
this.rtc = this.setupRtc(new Session(roomId, sessionConfig))
if (config.env.turnUrl) {
sessionConfig.turn = config.env.turnUrl
}
this.rtc = this.setupRtc(new Session(sessionConfig))
},
beforeDestroy() {
this.rtc.destroy()
Expand Down

0 comments on commit d527dfa

Please sign in to comment.