attachmediastream
Advanced tools
Comparing version 1.3.3 to 1.3.4
@@ -74,7 +74,6 @@ !function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.attachMediaStream=e():"undefined"!=typeof global?global.attachMediaStream=e():"undefined"!=typeof self&&(self.attachMediaStream=e())}(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);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.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); | ||
} | ||
@@ -99,3 +98,3 @@ }; | ||
webrtcDetectedBrowser = 'not a browser'; | ||
} else if (navigator.mozGetUserMedia && window.mozRTCPeerConnection) { | ||
} else if (navigator.mozGetUserMedia) { | ||
webrtcUtils.log('This appears to be Firefox'); | ||
@@ -239,18 +238,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; | ||
}; | ||
@@ -318,10 +308,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]); | ||
}); | ||
@@ -490,15 +473,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; | ||
@@ -511,8 +484,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; | ||
}; | ||
@@ -519,0 +489,0 @@ |
{ | ||
"name": "attachmediastream", | ||
"version": "1.3.3", | ||
"version": "1.3.4", | ||
"description": "cross-browser way to attach a media stream to a video element.", | ||
@@ -20,3 +20,3 @@ "main": "attachmediastream.js", | ||
"dependencies": { | ||
"webrtc-adapter-test": "^0.2.1" | ||
"webrtc-adapter-test": "^0.1.9" | ||
}, | ||
@@ -23,0 +23,0 @@ "devDependencies": { |
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
27424
611
+ Addedwebrtc-adapter-test@0.1.9(transitive)
- Removedwebrtc-adapter-test@0.2.10(transitive)
Updatedwebrtc-adapter-test@^0.1.9