webrtcsupport
Advanced tools
Comparing version 0.1.0 to 0.2.0
{ | ||
"name": "webrtcsupport", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Browser module to detect support for webrtc and extract proper constructors.", | ||
@@ -5,0 +5,0 @@ "main": "webrtcsupport.js", |
@@ -7,10 +7,19 @@ (function(e){if("function"==typeof bootstrap)bootstrap("webrtcsupport",e);else if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeWebrtcsupport=e}else"undefined"!=typeof window?window.webrtcsupport=e():global.webrtcsupport=e()})(function(){var define,ses,bootstrap,module,exports; | ||
var SessionDescription = window.RTCSessionDescription || window.mozRTCSessionDescription; | ||
var prefix = function () { | ||
if (window.mozRTCPeerConnection) { | ||
return 'moz'; | ||
} else if (window.webkitRTCPeerConnection) { | ||
return 'webkit'; | ||
} | ||
}(); | ||
var screenSharing = navigator.userAgent.match('Chrome') && parseInt(navigator.userAgent.match(/Chrome\/(.*) /)[1], 10) >= 26; | ||
// export support flags and constructors | ||
module.exports = { | ||
PeerConnection: PC, | ||
support: !!PC, | ||
dataChannel: !!(PC && PC.prototype.createDataChannel), | ||
prefix: prefix, | ||
screenSharing: screenSharing, | ||
SessionDescription: SessionDescription, | ||
IceCandidate: IceCandidate, | ||
support: !!PC, | ||
dataChannel: !!(PC && PC.prototype.createDataChannel) | ||
IceCandidate: IceCandidate | ||
}; | ||
@@ -17,0 +26,0 @@ |
@@ -12,11 +12,12 @@ // created by @HenrikJoreteg | ||
}(); | ||
var screenSharing = navigator.userAgent.match('Chrome') && parseInt(navigator.userAgent.match(/Chrome\/(.*) /)[1], 10) >= 26; | ||
// export support flags and constructors | ||
module.exports = { | ||
PeerConnection: PC, | ||
SessionDescription: SessionDescription, | ||
IceCandidate: IceCandidate, | ||
support: !!PC, | ||
dataChannel: !!(PC && PC.prototype.createDataChannel), | ||
prefix: prefix | ||
prefix: prefix, | ||
screenSharing: screenSharing, | ||
SessionDescription: SessionDescription, | ||
IceCandidate: IceCandidate | ||
}; |
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
4555
52