!function(e,t){"use strict";function i(e,t){this.$video=e,this.$wrapper=e.parent(),this.aspectRatio=parseFloat(e.data("aspect-ratio")),this.cover()}i.prototype.setVideoSize=function(){var e=this.$wrapper.outerWidth(),t=this.$wrapper.outerHeight(),i={width:e+"px",height:e*this.aspectRatio+"px"};parseInt(i.height)<t&&(i={width:t/this.aspectRatio+"px",height:t+"px"}),this.$video.css(i)},i.prototype.cover=function(){var t=this;this.setVideoSize(),e(window).resize((function(){t.setVideoSize()}))},i.jQueryInterface=function(){return new i(e(this))},e.fn.dMediaResponsiveVideo=i.jQueryInterface,t.behaviors.d_media_responsive_video={attach:function(t){e("iframe.video-embed--cover",t).each((function(){e(this).dMediaResponsiveVideo()}))}}}(jQuery,Drupal);
//# sourceMappingURL=media-oembed-video.js.map