Mozilla Firefox - Unable to create offer; throws InternalError : Cannot create an offer ...

Issue #26 new
Justin Njoh created an issue

Error message: InternalError: Cannot create an offer with no local tracks, no offerToReceiveAudio/Video, and no DataChannel.

Environment - Firefox navigator.buildID : 20150826023504 navigator.userAgent : Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:40.0) Gecko/20100101 Firefox/40.0

I may be making a rookie error, but the follow code works ok in Chrome but throws an error in FF. Any help would be greatly appreciated.

var pc = new mozRTCPeerConnection(null);

pc.addStream = function (s) { var v = document.createElement('video'); v.autoplay = true; v.src = URL.createObjectURL(s); document.lastChild.appendChild(v); window.my_stream = s; }

navigator.mozGetUserMedia({video: true, audio: true}, function (s) {pc.addStream(s); }, function (e) { console.log('E: ', e); });

function createoffer(con) { con.createOffer( function (offer) { con.setLocalDescription(new mozRTCSessionDescription(offer), function () { console.log('To send: ', JSON.stringify(offer)); }, function (e) { console.log('Local desc err: ', e); }); }, function (e) { console.log('create offer er: ', e); }); }

createoffer(pc); // this line throws above error

Comments (0)

  1. Log in to comment