Closed M0LTE closed 3 years ago
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.
@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.
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.