Authored by htoooth

video width and height

... ... @@ -4,7 +4,9 @@
'use strict';
module.exports = (url) => {
module.exports = (url, width, height) => {
width = width || 750;
height = height || 420;
return `<div class="video-wrap">
<a href="javascript:;" class="video-close-btn"></a>
<object id="video_0" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"
... ... @@ -16,10 +18,10 @@ module.exports = (url) => {
<param name="allowFullScreen" value="true">
<param value="always" name="allowScriptAccess">
<param value="transparent" name="wmode">
<embed class="video-player" id="flash" align="middle" pluginspage="http://www.macromedia.com/go/getflashplayer"
<embed style="width: ${width}px;height: ${height}px;" id="flash" align="middle" pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" loop="false"
play="true" bgcolor="#ffffff" quality="high" wmode="transparent" name="vMessage"
src="http://rescdn.yohoboys.com/res/new/boys/swf/util/VideoPlayerNew.swf?id=video_0&amp;url=${url}&amp;language=1&amp;sharepic=http://img01.yohoboys.com/contentimg/2016/06/12/14/0183fabea5332c5902cdd1d0d7fb63df04.jpg?imageMogr2/thumbnail/738x424|watermark/1/image/aHR0cDovL3Jlc2Nkbi55b2hvYm95cy5jb20vcmVzL25ldy9ib3lzL2ltYWdlcy9iYW5uZXJwbGF5LnBuZw==/dissolve/100/gravity/Center/dx/10/dy/10&amp;title1=Meet...Cody Sanderson &amp;shareurl=http://www.yohoboys.com/channel/detail/index/id/10657/time/1478052894&amp;coverpic=${url}/?vframe/jpg/offset/0">
src="http://rescdn.yohoboys.com/res/new/boys/swf/util/VideoPlayerNew.swf?id=video_0&amp;url=${url}&amp;language=1&amp;sharepic=http://img01.yohoboys.com/contentimg/2016/06/12/14/0183fabea5332c5902cdd1d0d7fb63df04.jpg?imageMogr2/thumbnail/738x424|watermark/1/image/aHR0cDovL3Jlc2Nkbi55b2hvYm95cy5jb20vcmVzL25ldy9ib3lzL2ltYWdlcy9iYW5uZXJwbGF5LnBuZw==/dissolve/100/gravity/Center/dx/10/dy/10&amp;title1=Meet...Cody Sanderson &amp;shareurl=http://www.yohoboys.com/channel/detail/index/id/10657/time/1478052894&amp;coverpic=${url}?vframe/jpg/offset/0">
</object>
</div> `;
};
... ...
... ... @@ -845,8 +845,11 @@ const _getDetailDataBySizeInfo = (sizeInfo) => {
$('.video-placeholder').each((idx, ele) => {
let $this = $(ele);
let videoSrc = $this.find('source').attr('src');
let $video = $this.find('video');
let width = $video.attr('width');
let height = $video.attr('height');
$this.empty().append(videoPlayerTpl(videoSrc));
$this.empty().append(videoPlayerTpl(videoSrc, width, height));
});
details += $.html();
... ...