Sha256: a909b54b47973d89bcea7a79b05574d4f244c20726f03879884a86e8d34c6943
Contents?: true
Size: 1.04 KB
Versions: 12
Compression:
Stored size: 1.04 KB
Contents
webshim.register('mediacapture-picker', function($, webshim, window, document, undefined, featureOptions){ "use strict"; function PhotoShooter($dom){ this.$dom = $dom; this._createDom(); this.requestMedia(); } PhotoShooter.prototype = { _createDom: function(){ this.$dom.html('<div class="ws-videocapture-view">' + '<video class="ws-usermedia ws-inlineusermedia" autoplay=""></video>' + '<div class="ws-video-overlay"></div>' + '</div>' + '<div class="button-row"><button type="button" class="ws-capture-button">take</button>' + '</div>') ; }, requestMedia: function(){ var that = this; navigator.getUserMedia( {video: {minWidth: 200, audio: false}}, function(stream){ that.stream = stream; $('video', that.$dom).prop('src', URL.createObjectURL(stream)); }, function(){ } ); $('video', that.$dom).removeClass('ws-usermedia'); } }; webshim.mediacapture.showContent = function($fileinput, $button, popover){ var stream = new PhotoShooter(popover.contentElement); }; });
Version data entries
12 entries across 12 versions & 1 rubygems