Skip to content

Commit

Permalink
1.0.0 again
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed May 11, 2016
1 parent b50f763 commit d26778d
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 19 deletions.
60 changes: 47 additions & 13 deletions dist/jssip.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* JsSIP v0.7.23
* JsSIP v1.0.0
* the Javascript SIP library
* Copyright: 2012-2016 José Luis Millán <jmillan@aliax.net> (https://github.com/jmillan)
* Homepage: http://jssip.net
Expand Down Expand Up @@ -14592,8 +14592,11 @@ RTCSession.prototype.answer = function(options) {
}

if (! self.late_sdp) {
var e = {originator:'remote', type:'offer', sdp:request.body};
self.emit('sdp', e);

self.connection.setRemoteDescription(
new rtcninja.RTCSessionDescription({type:'offer', sdp:request.body}),
new rtcninja.RTCSessionDescription({type:'offer', sdp:e.sdp}),
// success
remoteDescriptionSucceededOrNotNeeded,
// failure
Expand Down Expand Up @@ -15266,8 +15269,11 @@ RTCSession.prototype.receiveRequest = function(request) {
break;
}

var e = {originator:'remote', type:'answer', sdp:request.body};
this.emit('sdp', e);

this.connection.setRemoteDescription(
new rtcninja.RTCSessionDescription({type:'answer', sdp:request.body}),
new rtcninja.RTCSessionDescription({type:'answer', sdp:e.sdp}),
// success
function() {
if (!self.is_confirmed) {
Expand Down Expand Up @@ -15549,7 +15555,12 @@ function createLocalDescription(type, onSuccess, onFailure, constraints) {
if (! candidate) {
connection.onicecandidate = null;
self.rtcReady = true;
if (onSuccess) { onSuccess(connection.localDescription.sdp); }

if (onSuccess) {
var e = {originator:'local', type:type, sdp:connection.localDescription.sdp};
self.emit('sdp', e);
onSuccess(e.sdp);
}
onSuccess = null;
}
};
Expand All @@ -15559,7 +15570,12 @@ function createLocalDescription(type, onSuccess, onFailure, constraints) {
function() {
if (connection.iceGatheringState === 'complete') {
self.rtcReady = true;
if (onSuccess) { onSuccess(connection.localDescription.sdp); }

if (onSuccess) {
var e = {originator:'local', type:type, sdp:connection.localDescription.sdp};
self.emit('sdp', e);
onSuccess(e.sdp);
}
onSuccess = null;
}
},
Expand Down Expand Up @@ -15705,8 +15721,11 @@ function receiveReinvite(request) {
}
}

var e = {originator:'remote', type:'offer', sdp:request.body};
this.emit('sdp', e);

this.connection.setRemoteDescription(
new rtcninja.RTCSessionDescription({type:'offer', sdp:request.body}),
new rtcninja.RTCSessionDescription({type:'offer', sdp:e.sdp}),
// success
answer,
// failure
Expand Down Expand Up @@ -15847,8 +15866,11 @@ function receiveUpdate(request) {
}
}

var e = {originator:'remote', type:'offer', sdp:request.body};
this.emit('sdp', e);

this.connection.setRemoteDescription(
new rtcninja.RTCSessionDescription({type:'offer', sdp:request.body}),
new rtcninja.RTCSessionDescription({type:'offer', sdp:e.sdp}),
// success
function() {
if (self.remoteHold === true && hold === false) {
Expand Down Expand Up @@ -16116,7 +16138,7 @@ function sendInitialRequest(mediaConstraints, rtcOfferConstraints, mediaStream)
function receiveInviteResponse(response) {
debug('receiveInviteResponse()');

var cause, dialog,
var cause, dialog, e,
self = this;

// Handle 2XX retransmissions and responses from forked requests
Expand Down Expand Up @@ -16206,8 +16228,11 @@ function receiveInviteResponse(response) {
break;
}

e = {originator:'remote', type:'pranswer', sdp:response.body};
this.emit('sdp', e);

this.connection.setRemoteDescription(
new rtcninja.RTCSessionDescription({type:'pranswer', sdp:response.body}),
new rtcninja.RTCSessionDescription({type:'pranswer', sdp:e.sdp}),
// success
null,
// failure
Expand All @@ -16229,8 +16254,11 @@ function receiveInviteResponse(response) {
break;
}

e = {originator:'remote', type:'answer', sdp:response.body};
this.emit('sdp', e);

this.connection.setRemoteDescription(
new rtcninja.RTCSessionDescription({type:'answer', sdp:response.body}),
new rtcninja.RTCSessionDescription({type:'answer', sdp:e.sdp}),
// success
function() {
// Handle Session Timers.
Expand Down Expand Up @@ -16337,8 +16365,11 @@ function sendReinvite(options) {
return;
}

var e = {originator:'remote', type:'answer', sdp:response.body};
self.emit('sdp', e);

self.connection.setRemoteDescription(
new rtcninja.RTCSessionDescription({type:'answer', sdp:response.body}),
new rtcninja.RTCSessionDescription({type:'answer', sdp:e.sdp}),
// success
function() {
if (eventHandlers.succeeded) { eventHandlers.succeeded(response); }
Expand Down Expand Up @@ -16467,8 +16498,11 @@ function sendUpdate(options) {
return;
}

var e = {originator:'remote', type:'answer', sdp:response.body};
self.emit('sdp', e);

self.connection.setRemoteDescription(
new rtcninja.RTCSessionDescription({type:'answer', sdp:response.body}),
new rtcninja.RTCSessionDescription({type:'answer', sdp:e.sdp}),
// success
function() {
if (eventHandlers.succeeded) { eventHandlers.succeeded(response); }
Expand Down Expand Up @@ -23742,7 +23776,7 @@ module.exports={
"name": "jssip",
"title": "JsSIP",
"description": "the Javascript SIP library",
"version": "0.7.23",
"version": "1.0.0",
"homepage": "http://jssip.net",
"author": "José Luis Millán <jmillan@aliax.net> (https://github.com/jmillan)",
"contributors": [
Expand Down
Loading

0 comments on commit d26778d

Please sign in to comment.