'];
if (data.youtube_id) {
html.push('');
} else if (data.youtube_live_url) {
if (isSp) {
var widthRegexp = new RegExp(/width="([0-9]*)"/),
heightRegexp = new RegExp(/height="([0-9]*)"/),
widthMatches = widthRegexp.exec(data.youtube_live_url),
heightMatches = heightRegexp.exec(data.youtube_live_url);
if (widthMatches.length > 1 && heightMatches.length > 1) {
iframeWidth = widthMatches[1];
iframeHeight = heightMatches[1];
iframeHeight = Math.floor(iframeHeight * (624 / iframeWidth));
iframeWidth = 624;
}
}
html.push('' + data.youtube_live_url + '
');
} else {
if (data.pc_main_visual) {
html.push('
');
}
if (data.sp_main_visual) {
html.push('
');
}
}
html.push('');
$topVisual.html(html.join(''));
if (data.youtube_live_url && iframeWidth && iframeHeight && isSp) {
$topVisual.find('iframe').attr('width', iframeWidth).attr('height', iframeHeight);
}
}
});
})(jQuery);