webrtc-adapter
Advanced tools
Comparing version 1.0.2 to 1.0.4
{ | ||
"name": "webrtc-adapter", | ||
"version": "1.0.2", | ||
"version": "1.0.4", | ||
"description": "A shim to insulate apps from WebRTC spec changes and browser prefix differences", | ||
"license": "BSD-3-Clause", | ||
"main": "./src/js/adapter-core.js", | ||
"main": "./src/js/adapter_core.js", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -45,7 +45,7 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
case 'chrome': | ||
if (!chromeShim) { | ||
if (!chromeShim||!chromeShim.shimPeerConnection) { | ||
logging('Chrome shim is not included in this adapter release.'); | ||
return; | ||
} | ||
logging('Adapter.js shimming chrome!'); | ||
logging('adapter.js shimming chrome!'); | ||
// Export to the adapter global object visible in the browser. | ||
@@ -60,7 +60,7 @@ module.exports.browserShim = chromeShim; | ||
case 'edge': | ||
if (!edgeShim) { | ||
if (!edgeShim||!edgeShim.shimPeerConnection) { | ||
logging('MS edge shim is not included in this adapter release.'); | ||
return; | ||
} | ||
logging('Adapter.js shimming edge!'); | ||
logging('adapter.js shimming edge!'); | ||
// Export to the adapter global object visible in the browser. | ||
@@ -72,7 +72,7 @@ module.exports.browserShim = edgeShim; | ||
case 'firefox': | ||
if (!firefoxShim) { | ||
if (!firefoxShim||!firefoxShim.shimPeerConnection) { | ||
logging('Firefox shim is not included in this adapter release.'); | ||
return; | ||
} | ||
logging('Adapter.js shimming firefox!'); | ||
logging('adapter.js shimming firefox!'); | ||
// Export to the adapter global object visible in the browser. | ||
@@ -741,3 +741,3 @@ module.exports.browserShim = firefoxShim; | ||
result.browser = null; | ||
result.version = null | ||
result.version = null; | ||
result.minVersion = null; | ||
@@ -778,2 +778,6 @@ | ||
} | ||
// Non supported browser default. | ||
result.browser = 'Not a supported browser.'; | ||
return result; | ||
} | ||
@@ -780,0 +784,0 @@ }; |
@@ -45,7 +45,7 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.adapter = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
case 'chrome': | ||
if (!chromeShim) { | ||
if (!chromeShim||!chromeShim.shimPeerConnection) { | ||
logging('Chrome shim is not included in this adapter release.'); | ||
return; | ||
} | ||
logging('Adapter.js shimming chrome!'); | ||
logging('adapter.js shimming chrome!'); | ||
// Export to the adapter global object visible in the browser. | ||
@@ -60,7 +60,7 @@ module.exports.browserShim = chromeShim; | ||
case 'edge': | ||
if (!edgeShim) { | ||
if (!edgeShim||!edgeShim.shimPeerConnection) { | ||
logging('MS edge shim is not included in this adapter release.'); | ||
return; | ||
} | ||
logging('Adapter.js shimming edge!'); | ||
logging('adapter.js shimming edge!'); | ||
// Export to the adapter global object visible in the browser. | ||
@@ -72,7 +72,7 @@ module.exports.browserShim = edgeShim; | ||
case 'firefox': | ||
if (!firefoxShim) { | ||
if (!firefoxShim||!firefoxShim.shimPeerConnection) { | ||
logging('Firefox shim is not included in this adapter release.'); | ||
return; | ||
} | ||
logging('Adapter.js shimming firefox!'); | ||
logging('adapter.js shimming firefox!'); | ||
// Export to the adapter global object visible in the browser. | ||
@@ -741,3 +741,3 @@ module.exports.browserShim = firefoxShim; | ||
result.browser = null; | ||
result.version = null | ||
result.version = null; | ||
result.minVersion = null; | ||
@@ -778,2 +778,6 @@ | ||
} | ||
// Non supported browser default. | ||
result.browser = 'Not a supported browser.'; | ||
return result; | ||
} | ||
@@ -780,0 +784,0 @@ }; |
{ | ||
"name": "webrtc-adapter", | ||
"version": "1.0.2", | ||
"version": "1.0.4", | ||
"description": "A shim to insulate apps from WebRTC spec changes and browser prefix differences", | ||
@@ -5,0 +5,0 @@ "license": "BSD-3-Clause", |
@@ -9,3 +9,2 @@ [![Build Status](https://travis-ci.org/webrtc/adapter.svg)](https://travis-ci.org/webrtc/adapter) | ||
#### Bower | ||
TODO: Might need to point to the gh-pages branch instead so that the prebuilt versions can be accessed. | ||
```bash | ||
@@ -23,6 +22,6 @@ bower install webrtc-adapter | ||
In node_modules/webrtc-adapter/out/ folder you will find 4 files: | ||
* adapter.js - includes all the shims and is visible in the browser under the global `adapter` object (window.adapter). | ||
* adapter_no_edge.js - same as above but does not include the Microsoft Edge (ORTC) shim. | ||
* adapter_no_edge_no_global.js - same as above but is not exposed/visible in the browser (you cannot call/interact with the shims in the browser). | ||
* adapter.js_no_global.js - same as adapter.js but is not exposed/visible in the browser (you cannot call/interact with the shims in the browser). | ||
* `adapter.js` - includes all the shims and is visible in the browser under the global `adapter` object (window.adapter). | ||
* `adapter_no_edge.js` - same as above but does not include the Microsoft Edge (ORTC) shim. | ||
* `adapter_no_edge_no_global.js` - same as above but is not exposed/visible in the browser (you cannot call/interact with the shims in the browser). | ||
* `adapter_no_global.js` - same as `adapter.js` but is not exposed/visible in the browser (you cannot call/interact with the shims in the browser). | ||
@@ -34,3 +33,3 @@ Include the file that suits your need in your project. | ||
Latest version can be found at http://webrtc.github.io/adapter/adapter-latest.js. | ||
Specific versions can be found at http://webrtc.github.io/adapter/adapter-<version>.js, e.g. http://webrtc.github.io/adapter/adapter-0.2.10.js. | ||
Specific versions can be found at http://webrtc.github.io/adapter/adapter-N.N.N.js, e.g. http://webrtc.github.io/adapter/adapter-1.0.2.js. | ||
@@ -37,0 +36,0 @@ #### NPM |
@@ -42,7 +42,7 @@ /* | ||
case 'chrome': | ||
if (!chromeShim) { | ||
if (!chromeShim||!chromeShim.shimPeerConnection) { | ||
logging('Chrome shim is not included in this adapter release.'); | ||
return; | ||
} | ||
logging('Adapter.js shimming chrome!'); | ||
logging('adapter.js shimming chrome!'); | ||
// Export to the adapter global object visible in the browser. | ||
@@ -57,7 +57,7 @@ module.exports.browserShim = chromeShim; | ||
case 'edge': | ||
if (!edgeShim) { | ||
if (!edgeShim||!edgeShim.shimPeerConnection) { | ||
logging('MS edge shim is not included in this adapter release.'); | ||
return; | ||
} | ||
logging('Adapter.js shimming edge!'); | ||
logging('adapter.js shimming edge!'); | ||
// Export to the adapter global object visible in the browser. | ||
@@ -69,7 +69,7 @@ module.exports.browserShim = edgeShim; | ||
case 'firefox': | ||
if (!firefoxShim) { | ||
if (!firefoxShim||!firefoxShim.shimPeerConnection) { | ||
logging('Firefox shim is not included in this adapter release.'); | ||
return; | ||
} | ||
logging('Adapter.js shimming firefox!'); | ||
logging('adapter.js shimming firefox!'); | ||
// Export to the adapter global object visible in the browser. | ||
@@ -76,0 +76,0 @@ module.exports.browserShim = firefoxShim; |
@@ -550,14 +550,14 @@ /* | ||
// ICETransport.completed and connected are the same for this purpose. | ||
states.connected += states.completed; | ||
states['connected'] += states['completed']; | ||
newState = 'new'; | ||
if (states.failed > 0) { | ||
if (states['failed'] > 0) { | ||
newState = 'failed'; | ||
} else if (states.connecting > 0 || states.checking > 0) { | ||
} else if (states['connecting'] > 0 || states['checking'] > 0) { | ||
newState = 'connecting'; | ||
} else if (states.disconnected > 0) { | ||
} else if (states['disconnected'] > 0) { | ||
newState = 'disconnected'; | ||
} else if (states.new > 0) { | ||
} else if (states['new'] > 0) { | ||
newState = 'new'; | ||
} else if (states.connecting > 0 || states.completed > 0) { | ||
} else if (states['connecting'] > 0 || states['completed'] > 0) { | ||
newState = 'connected'; | ||
@@ -564,0 +564,0 @@ } |
@@ -54,3 +54,3 @@ /* | ||
result.browser = null; | ||
result.version = null | ||
result.version = null; | ||
result.minVersion = null; | ||
@@ -91,2 +91,6 @@ | ||
} | ||
// Non supported browser default. | ||
result.browser = 'Not a supported browser.'; | ||
return result; | ||
} | ||
@@ -93,0 +97,0 @@ }; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
9210
1
23
352671
29
41