getusermedia
Advanced tools
Comparing version 1.3.3 to 1.3.4
@@ -110,7 +110,6 @@ (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.getUserMedia = 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){ | ||
// suppress console.log output when being included as a module. | ||
if (typeof module !== 'undefined' || | ||
typeof require === 'function' && typeof define === 'function') { | ||
return; | ||
if (!(typeof module !== 'undefined' || | ||
typeof require === 'function') && (typeof define === 'function')) { | ||
console.log.apply(console, arguments); | ||
} | ||
console.log.apply(console, arguments); | ||
} | ||
@@ -135,3 +134,3 @@ }; | ||
webrtcDetectedBrowser = 'not a browser'; | ||
} else if (navigator.mozGetUserMedia && window.mozRTCPeerConnection) { | ||
} else if (navigator.mozGetUserMedia) { | ||
webrtcUtils.log('This appears to be Firefox'); | ||
@@ -275,18 +274,9 @@ | ||
} | ||
Object.defineProperty(HTMLVideoElement.prototype, 'srcObject', { | ||
get: function() { | ||
return this.mozSrcObject; | ||
}, | ||
set: function(stream) { | ||
this.mozSrcObject = stream; | ||
} | ||
}); | ||
// Attach a media stream to an element. | ||
attachMediaStream = function(element, stream) { | ||
element.srcObject = stream; | ||
element.mozSrcObject = stream; | ||
}; | ||
reattachMediaStream = function(to, from) { | ||
to.srcObject = from.srcObject; | ||
to.mozSrcObject = from.mozSrcObject; | ||
}; | ||
@@ -354,10 +344,3 @@ | ||
return new Promise(function(resolve, reject) { | ||
if (args.length === 1 && selector === null) { | ||
origGetStats.apply(self, [ | ||
function(response) { | ||
resolve.apply(null, [fixChromeStats(response)]); | ||
}, reject]); | ||
} else { | ||
origGetStats.apply(self, [resolve, reject]); | ||
} | ||
origGetStats.apply(self, [resolve, reject]); | ||
}); | ||
@@ -526,15 +509,5 @@ }; | ||
Object.defineProperty(HTMLVideoElement.prototype, 'srcObject', { | ||
get: function() { | ||
return this._srcObject; | ||
}, | ||
set: function(stream) { | ||
this._srcObject = stream; | ||
this.src = URL.createObjectURL(stream); | ||
} | ||
}); | ||
// Attach a media stream to an element. | ||
attachMediaStream = function(element, stream) { | ||
if (webrtcDetectedVersion >= 43) { | ||
if (typeof element.srcObject !== 'undefined') { | ||
element.srcObject = stream; | ||
@@ -547,8 +520,5 @@ } else if (typeof element.src !== 'undefined') { | ||
}; | ||
reattachMediaStream = function(to, from) { | ||
if (webrtcDetectedVersion >= 43) { | ||
to.srcObject = from.srcObject; | ||
} else { | ||
to.src = from.src; | ||
} | ||
to.src = from.src; | ||
}; | ||
@@ -555,0 +525,0 @@ |
{ | ||
"name": "getusermedia", | ||
"description": "cross-browser getUserMedia shim with node.js style error-first API.", | ||
"version": "1.3.3", | ||
"version": "1.3.4", | ||
"author": "Henrik Joreteg <henrik@andyet.net>", | ||
@@ -21,3 +21,3 @@ "browser": "index-browser.js", | ||
"dependencies": { | ||
"webrtc-adapter-test": "^0.2.1" | ||
"webrtc-adapter-test": "^0.1.9" | ||
}, | ||
@@ -24,0 +24,0 @@ "testling": { |
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
29970
666
+ Addedwebrtc-adapter-test@0.1.9(transitive)
- Removedwebrtc-adapter-test@0.2.10(transitive)
Updatedwebrtc-adapter-test@^0.1.9