Skip to content

Commit

Permalink
console.error the connection config
Browse files Browse the repository at this point in the history
  • Loading branch information
vanderhoop committed May 16, 2017
1 parent 6d1219a commit 13580f4
Showing 1 changed file with 27 additions and 28 deletions.
55 changes: 27 additions & 28 deletions web/static/js/components/remote_retro.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,35 +102,34 @@ class RemoteRetro extends Component {

const timeout = setTimeout(() => {
let peerConnectionConfig
$(document).ready(() => {
$.get("https://service.xirsys.com/ice", {
ident: "vanderhoop",
secret: "82b5a4fc-3a2b-11e7-85a3-64eeb285e4c6",
domain: "www.remote-retro-stride.org",
application: "default",
room: "default",
secure: 1,
}, (data, status) => {
peerConnectionConfig = data.d
const webrtc = new SimpleWebRTC({
localVideoEl: `${userToken}-video-container`,
autoRequestMedia: true,
nick: userToken,
debug: true,
peerConnectionConfig,
})

webrtc.on("readyToCall", () => {
webrtc.joinRoom(window.retroUUID)
})

webrtc.on("videoAdded", (video, peer) => {
let newPresences = updatePresences(this.state.presences, peer.nick, { video })
this.setState({ presences: newPresences })
})

clearTimeout(timeout)
$.get("https://service.xirsys.com/ice", {
ident: "vanderhoop",
secret: "82b5a4fc-3a2b-11e7-85a3-64eeb285e4c6",
domain: "www.remote-retro-stride.org",
application: "default",
room: "default",
secure: 1,
}, (data, status) => {
peerConnectionConfig = data.d
console.error("peerConnectionConfig", peerConnectionConfig)
const webrtc = new SimpleWebRTC({
localVideoEl: `${userToken}-video-container`,
autoRequestMedia: true,
nick: userToken,
debug: true,
peerConnectionConfig,
})

webrtc.on("readyToCall", () => {
webrtc.joinRoom(window.retroUUID)
})

webrtc.on("videoAdded", (video, peer) => {
let newPresences = updatePresences(this.state.presences, peer.nick, { video })
this.setState({ presences: newPresences })
})

clearTimeout(timeout)
})
}, 500)
}
Expand Down

0 comments on commit 13580f4

Please sign in to comment.