The documentation is great until the part to put the media on the dom. No documentation at all, I guess I need to get the onaddstream event from peerconnection, but I don't know how to get the peerconnection object.
var session = userAgent.invite('sip:12345',options);
session.sessionDescriptionHandler.peerConnection.onaddstream = = function(){
console.log('stream added');
}
Don't work gives the error:
Uncaught TypeError: Cannot read property 'peerConnection' of undefined
although if I console log session object right before, I can see the peerconnection under sessionDescriptionHandler... .wtf...