Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "webrtc", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"tags": ["webrtc", "browser"], | ||
@@ -17,3 +17,3 @@ "repository": { | ||
"getscreenmedia": "0.1.0", | ||
"attachmediastream": "0.1.1", | ||
"attachmediastream": "1.0.0", | ||
"hark": "0.1.1" | ||
@@ -20,0 +20,0 @@ }, |
@@ -91,4 +91,3 @@ (function(e){if("function"==typeof bootstrap)bootstrap("webrtc",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.makeWebRTC=e}else"undefined"!=typeof window?window.WebRTC=e():global.WebRTC=e()})(function(){var define,ses,bootstrap,module,exports; | ||
if (el) { | ||
attachMediaStream(el, stream); | ||
el.muted = true; | ||
attachMediaStream(stream, el, {muted: true}); | ||
} | ||
@@ -387,8 +386,27 @@ | ||
},{}],4:[function(require,module,exports){ | ||
module.exports = function (element, stream, play) { | ||
var autoPlay = (play === false) ? false : true; | ||
module.exports = function (stream, el, options) { | ||
var URL = window.URL; | ||
var opts = { | ||
autoplay: true, | ||
mirror: false, | ||
muted: false | ||
}; | ||
var element = el || document.createElement('video'); | ||
var item; | ||
if (autoPlay) element.autoplay = true; | ||
if (options) { | ||
for (item in options) { | ||
opts[item] = options[item]; | ||
} | ||
} | ||
if (opts.autoplay) element.autoplay = 'autoplay'; | ||
if (opts.muted) element.muted = true; | ||
if (opts.mirror) { | ||
['', 'moz', 'webkit', 'o', 'ms'].forEach(function (prefix) { | ||
var styleName = prefix ? prefix + 'Transform' : 'transform'; | ||
element.style[styleName] = 'scaleX(-1)'; | ||
}); | ||
} | ||
// this first one should work most everywhere now | ||
@@ -395,0 +413,0 @@ // but we have a few fallbacks just in case. |
@@ -89,4 +89,3 @@ var webrtc = require('webrtcsupport'); | ||
if (el) { | ||
attachMediaStream(el, stream); | ||
el.muted = true; | ||
attachMediaStream(stream, el, {muted: true}); | ||
} | ||
@@ -93,0 +92,0 @@ |
33576
944
+ Addedattachmediastream@1.0.0(transitive)
- Removedattachmediastream@0.1.1(transitive)
Updatedattachmediastream@1.0.0