Skip to content

Commit 1ff9877

Browse files
committed
Merge pull request #193 from Temasys/development
0.13.3
2 parents 23e185b + 9def37c commit 1ff9877

7 files changed

Lines changed: 69 additions & 51 deletions

File tree

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "adapterjs",
33
"description": "Creating a common API for WebRTC in the browser",
4-
"version": "0.13.2",
4+
"version": "0.13.3",
55
"homepage": "https://temasys.github.io/",
66
"author": {
77
"name": "Temasys Communications Pte. Ltd.",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "adapterjs",
33
"description": "Creating a common API for WebRTC in the browser",
4-
"version": "0.13.2",
4+
"version": "0.13.3",
55
"homepage": "https://temasys.github.io/",
66
"author": {
77
"name": "Temasys Communications Pte. Ltd.",

publish/adapter.debug.js

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! adapterjs - v0.13.2 - 2016-03-18 */
1+
/*! adapterjs - v0.13.3 - 2016-04-13 */
22

33
// Adapter's interface.
44
var AdapterJS = AdapterJS || {};
@@ -17,7 +17,7 @@ AdapterJS.options = AdapterJS.options || {};
1717
// AdapterJS.options.hidePluginInstallPrompt = true;
1818

1919
// AdapterJS version
20-
AdapterJS.VERSION = '0.13.2';
20+
AdapterJS.VERSION = '0.13.3';
2121

2222
// This function will be called when the WebRTC API is ready to be used
2323
// Whether it is the native implementation (Chrome, Firefox, Opera) or
@@ -2709,24 +2709,30 @@ if ( navigator.mozGetUserMedia ||
27092709

27102710
// Call relevant PeerConnection constructor according to plugin version
27112711
AdapterJS.WebRTCPlugin.WaitForPluginReady();
2712+
2713+
// RTCPeerConnection prototype from the old spec
2714+
var iceServers = null;
2715+
if (servers && Array.isArray(servers.iceServers)) {
2716+
iceServers = servers.iceServers;
2717+
for (var i = 0; i < iceServers.length; i++) {
2718+
// Legacy plugin versions compatibility
2719+
if (iceServers[i].urls && !iceServers[i].url) {
2720+
iceServers[i].url = iceServers[i].urls;
2721+
}
2722+
iceServers[i].hasCredentials = AdapterJS.
2723+
isDefined(iceServers[i].username) &&
2724+
AdapterJS.isDefined(iceServers[i].credential);
2725+
}
2726+
}
2727+
27122728
if (AdapterJS.WebRTCPlugin.plugin.PEER_CONNECTION_VERSION &&
27132729
AdapterJS.WebRTCPlugin.plugin.PEER_CONNECTION_VERSION > 1) {
27142730
// RTCPeerConnection prototype from the new spec
2731+
if (iceServers) {
2732+
servers.iceServers = iceServers;
2733+
}
27152734
return AdapterJS.WebRTCPlugin.plugin.PeerConnection(servers);
27162735
} else {
2717-
// RTCPeerConnection prototype from the old spec
2718-
var iceServers = null;
2719-
if (servers && Array.isArray(servers.iceServers)) {
2720-
iceServers = servers.iceServers;
2721-
for (var i = 0; i < iceServers.length; i++) {
2722-
if (iceServers[i].urls && !iceServers[i].url) {
2723-
iceServers[i].url = iceServers[i].urls;
2724-
}
2725-
iceServers[i].hasCredentials = AdapterJS.
2726-
isDefined(iceServers[i].username) &&
2727-
AdapterJS.isDefined(iceServers[i].credential);
2728-
}
2729-
}
27302736
var mandatory = (constraints && constraints.mandatory) ?
27312737
constraints.mandatory : null;
27322738
var optional = (constraints && constraints.optional) ?

publish/adapter.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

publish/adapter.screenshare.js

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! adapterjs - v0.13.2 - 2016-03-18 */
1+
/*! adapterjs - v0.13.3 - 2016-04-13 */
22

33
// Adapter's interface.
44
var AdapterJS = AdapterJS || {};
@@ -17,7 +17,7 @@ AdapterJS.options = AdapterJS.options || {};
1717
// AdapterJS.options.hidePluginInstallPrompt = true;
1818

1919
// AdapterJS version
20-
AdapterJS.VERSION = '0.13.2';
20+
AdapterJS.VERSION = '0.13.3';
2121

2222
// This function will be called when the WebRTC API is ready to be used
2323
// Whether it is the native implementation (Chrome, Firefox, Opera) or
@@ -2709,24 +2709,30 @@ if ( navigator.mozGetUserMedia ||
27092709

27102710
// Call relevant PeerConnection constructor according to plugin version
27112711
AdapterJS.WebRTCPlugin.WaitForPluginReady();
2712+
2713+
// RTCPeerConnection prototype from the old spec
2714+
var iceServers = null;
2715+
if (servers && Array.isArray(servers.iceServers)) {
2716+
iceServers = servers.iceServers;
2717+
for (var i = 0; i < iceServers.length; i++) {
2718+
// Legacy plugin versions compatibility
2719+
if (iceServers[i].urls && !iceServers[i].url) {
2720+
iceServers[i].url = iceServers[i].urls;
2721+
}
2722+
iceServers[i].hasCredentials = AdapterJS.
2723+
isDefined(iceServers[i].username) &&
2724+
AdapterJS.isDefined(iceServers[i].credential);
2725+
}
2726+
}
2727+
27122728
if (AdapterJS.WebRTCPlugin.plugin.PEER_CONNECTION_VERSION &&
27132729
AdapterJS.WebRTCPlugin.plugin.PEER_CONNECTION_VERSION > 1) {
27142730
// RTCPeerConnection prototype from the new spec
2731+
if (iceServers) {
2732+
servers.iceServers = iceServers;
2733+
}
27152734
return AdapterJS.WebRTCPlugin.plugin.PeerConnection(servers);
27162735
} else {
2717-
// RTCPeerConnection prototype from the old spec
2718-
var iceServers = null;
2719-
if (servers && Array.isArray(servers.iceServers)) {
2720-
iceServers = servers.iceServers;
2721-
for (var i = 0; i < iceServers.length; i++) {
2722-
if (iceServers[i].urls && !iceServers[i].url) {
2723-
iceServers[i].url = iceServers[i].urls;
2724-
}
2725-
iceServers[i].hasCredentials = AdapterJS.
2726-
isDefined(iceServers[i].username) &&
2727-
AdapterJS.isDefined(iceServers[i].credential);
2728-
}
2729-
}
27302736
var mandatory = (constraints && constraints.mandatory) ?
27312737
constraints.mandatory : null;
27322738
var optional = (constraints && constraints.optional) ?

publish/adapter.screenshare.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/adapter.js

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -953,24 +953,30 @@ if ( navigator.mozGetUserMedia ||
953953

954954
// Call relevant PeerConnection constructor according to plugin version
955955
AdapterJS.WebRTCPlugin.WaitForPluginReady();
956+
957+
// RTCPeerConnection prototype from the old spec
958+
var iceServers = null;
959+
if (servers && Array.isArray(servers.iceServers)) {
960+
iceServers = servers.iceServers;
961+
for (var i = 0; i < iceServers.length; i++) {
962+
// Legacy plugin versions compatibility
963+
if (iceServers[i].urls && !iceServers[i].url) {
964+
iceServers[i].url = iceServers[i].urls;
965+
}
966+
iceServers[i].hasCredentials = AdapterJS.
967+
isDefined(iceServers[i].username) &&
968+
AdapterJS.isDefined(iceServers[i].credential);
969+
}
970+
}
971+
956972
if (AdapterJS.WebRTCPlugin.plugin.PEER_CONNECTION_VERSION &&
957973
AdapterJS.WebRTCPlugin.plugin.PEER_CONNECTION_VERSION > 1) {
958974
// RTCPeerConnection prototype from the new spec
975+
if (iceServers) {
976+
servers.iceServers = iceServers;
977+
}
959978
return AdapterJS.WebRTCPlugin.plugin.PeerConnection(servers);
960979
} else {
961-
// RTCPeerConnection prototype from the old spec
962-
var iceServers = null;
963-
if (servers && Array.isArray(servers.iceServers)) {
964-
iceServers = servers.iceServers;
965-
for (var i = 0; i < iceServers.length; i++) {
966-
if (iceServers[i].urls && !iceServers[i].url) {
967-
iceServers[i].url = iceServers[i].urls;
968-
}
969-
iceServers[i].hasCredentials = AdapterJS.
970-
isDefined(iceServers[i].username) &&
971-
AdapterJS.isDefined(iceServers[i].credential);
972-
}
973-
}
974980
var mandatory = (constraints && constraints.mandatory) ?
975981
constraints.mandatory : null;
976982
var optional = (constraints && constraints.optional) ?

0 commit comments

Comments
 (0)