client/src/components/project/distributions/renderers/dirMediaEmbed.js
//use to resize iframe if embedly fails and has embed
use to resize iframe if embedly fails and has embed
use to resize iframe if embedly fails and has embed
function resizeIframeStringToWidth(iframeStr, width) {
            var $iframe = $(iframeStr);
            var rat = $iframe.attr('width')/$iframe.attr('height');
            $iframe.attr('width', width);
            var h = width/rat;
            if(scope.renderHeight) {
                h = Math.min(scope.renderHeight, h);
            }
            $iframe.attr('height', h);
            return $iframe.prop('outerHTML');
        }
function resizeIframeStringToWidth ( iframeStr , width ) { var $iframe = $ ( iframeStr ) ; var rat = $iframe . attr ( 'width' ) / $iframe . attr ( 'height' ) ; $iframe . attr ( 'width' , width ) ; var h = width / rat ; if ( scope . renderHeight ) { h = Math . min ( scope . renderHeight , h ) ; } $iframe . attr ( 'height' , h ) ; return $iframe . prop ( 'outerHTML' ) ; }
use to resize iframe if embedly fails and has embed
use to resize iframe if embedly fails and has embed