WebRTC demo page errors
Closed this issue · 2 comments
M0LTE commented
When I open https://gavv.github.io/webrtc-cli/ I get:
Creating session...
Adding microphone to session...
TypeError: Cannot read property 'sdp' of null
Chrome latest on Windows 10.
groberts817 commented
I changed this line: https://github.com/gavv/webrtc-cli/blob/master/docs/index.html#L94 and the one below it to:
pc.setLocalDescription(offer).then(function() {
document.getElementById('offer').value = pc.localDescription.sdp
});
since setLocalDescription is an asynchronous function that returns a promise. The localDescription is not yet set in the original code.
gavv commented
@M0LTE @groberts817 thanks! I was able to reproduce the issue and apply the fix. Pushed to master. Closing this, but feel free to reopen if it's not fixed for you.