Closed KensakuKOMATSU closed 9 years ago
current sequence is
Negotiator.startConnection = function(connection, options) {
var pc = Negotiator._getPeerConnection(connection, options);
if (connection.type === 'media' && options._stream) {
// Add the stream.
pc.addStream(options._stream);
}
// Set the connection's PC.
connection.pc = connection.peerConnection = pc;
however, from FF40 negotiationneeded
event immidiately fired when addStream called. before putting pc into connection object. Then,
Negotiator._makeOffer = function(connection) {
var pc = connection.pc;
if(!!pc.remoteDescription && !!pc.remoteDescription.type) return;
pc.createOffer(function(offer) {
createOffer was called while connection.pc equal undefined.
So, exchanging the line shown below will be work well.
Negotiator.startConnection = function(connection, options) {
var pc = Negotiator._getPeerConnection(connection, options);
// Set the connection's PC.
connection.pc = connection.peerConnection = pc;
if (connection.type === 'media' && options._stream) {
// Add the stream.
pc.addStream(options._stream);
}
Video stream properly transferred. However, below alert shown.
Cannot set local offer in state have-remote-offer
browser conditions shown below are tested with example/videochat/index.html and example/chat.html
FF40 <---> FF40
FF40 <---> Chrome44
Chrome44 <---> FF40
+1
console shows that createOffer failed cause pc (peerconncetion object) is undefined.