diff options
Diffstat (limited to 'build/js/jsxc/lib/strophe.jingle/strophe.jingle.adapter.js')
-rw-r--r-- | build/js/jsxc/lib/strophe.jingle/strophe.jingle.adapter.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/build/js/jsxc/lib/strophe.jingle/strophe.jingle.adapter.js b/build/js/jsxc/lib/strophe.jingle/strophe.jingle.adapter.js index 23984de..f10fcdf 100644 --- a/build/js/jsxc/lib/strophe.jingle/strophe.jingle.adapter.js +++ b/build/js/jsxc/lib/strophe.jingle/strophe.jingle.adapter.js @@ -1,5 +1,8 @@ /* jshint -W117 */ -function TraceablePeerConnection(ice_config, constraints) { +var setupRTC, getUserMediaWithConstraints, TraceablePeerConnection; + +(function($){ +TraceablePeerConnection = function(ice_config, constraints) { var self = this; var RTCPeerconnection = navigator.mozGetUserMedia ? mozRTCPeerConnection : webkitRTCPeerConnection; this.peerconnection = new RTCPeerconnection(ice_config, constraints); @@ -176,7 +179,7 @@ TraceablePeerConnection.prototype.getStats = function(callback) { // mozilla chrome compat layer -- very similar to adapter.js -function setupRTC() { +setupRTC = function (){ var RTC = null; if (navigator.mozGetUserMedia) { console.log('This appears to be Firefox'); @@ -229,9 +232,9 @@ function setupRTC() { try { console.log('Browser does not appear to be WebRTC-capable'); } catch (e) { } } return RTC; -} +}; -function getUserMediaWithConstraints(um, resolution, bandwidth, fps) { +getUserMediaWithConstraints = function(um, resolution, bandwidth, fps) { var constraints = {audio: false, video: false}; if (um.indexOf('video') >= 0) { @@ -324,3 +327,4 @@ function getUserMediaWithConstraints(um, resolution, bandwidth, fps) { $(document).trigger('mediafailure.jingle'); } } +}(jQuery));
\ No newline at end of file |