如何在我的幻灯片上设置iframe视频
How to set iframe video on my slideshow?
这是我的http://jsfiddle.net/j88u02o2/59/
这是滑块的脚本:
$(function() {
$('#slides').crossSlide({
speed: 40,
fade: 1
}, [
{ src: 'img/photo-2.jpg', dir: 'up', alt: 'Our Business is to Encrypt and Secure Your Communications', href: '#' },
{ src: 'img/photo-10.jpg', dir: 'down', alt: 'The Solution for Secured Communications and Privacy.', href: '#' },
{ src: 'img/photo-3.jpg', dir: 'up', alt: 'All Text and Phone Communications are Encrypted End-to-End.', href: '#' },
{ src: 'img/photo-4.jpg', dir: 'down', alt: 'Secured Communications for Law Enforcement and Public Officials.', href: '#' },
{ src: 'img/photo-5.jpg', dir: 'up', alt: 'Secured Communications for the U.S. Military.', href: '#' },
{ src: 'img/photo-6.jpg', dir: 'down', alt: 'The World Leader in Encrypted Communications.', href: '#' },
{ src: 'img/photo-7.jpg', dir: 'down', alt: 'The Solution for Corporate Executives, Law Enforcement, Homeland Security, Goverment Agencies and more...', href: '#' }
/* */
], function(idx, img, idxOut, imgOut) {
if (idxOut == undefined) {
if(idx == 0 || idx == 3 || idx == 6 || idx == 9){
document.getElementById('crossSlideCaption').style.marginTop = '-425px';
document.getElementById('crossSlideCaption').style.marginLeft = '-480px';
}else if(idx == 1 || idx == 4 || idx == 7 || idx == 10 || idx == 12){
document.getElementById('crossSlideCaption').style.marginTop = '-425px';
document.getElementById('crossSlideCaption').style.marginLeft = '-480px';
}else{
document.getElementById('crossSlideCaption').style.marginTop = '-425px';
document.getElementById('crossSlideCaption').style.marginLeft = '-480px';
};
$('div.caption').text(img.alt).animate({ opacity: 1.0 })
} else {
//$('div.caption').animate({ opacity: 0 })
}});
$('div.caption').show().css({ opacity: 0 })
});
现在一切都很好,现在我需要在我的幻灯片中添加iframe视频作为标题。
我的视频大小为420x234像素,这是iframe视频的代码:
<iframe src="//fast.wistia.net/embed/iframe/bqur1fvyag?videoFoam=true" allowtransparency="true" frameborder="0" scrolling="no" class="wistia_embed" name="wistia_embed" allowfullscreen mozallowfullscreen webkitallowfullscreen oallowfullscreen msallowfullscreen width="720" height="433"></iframe>
<script src="//fast.wistia.net/assets/external/E-v1.js"></script>
但我不知道如何添加我现有的代码。
有人能帮我做到这一点吗?
提前谢谢。
这是我的答案:
<script>
wistiaEmbed = Wistia.embed("bqur1fvyag", {
videoFoam: {
maxWidth: 420,
maxHeight: 234
},
plugin: {
"socialbar-v1": {
buttons: ""
}
}
});
</script>
相关文章:
- 使用javascript设置iframe的高度
- 设置iFrame的高度
- 在页面上设置iframe
- jQuery/Javascript:从iframe内部设置iframe的边界
- 如何设置iframe以自动填充HTML中的空白正文空间
- 设置iframe marginheight=“;0”;通过javascript
- 如何在我的幻灯片上设置iframe视频
- 根据内容设置 iFrame 宽度和高度
- Android WebView:设置 iframe src 会重定向页面
- JQuery根据iframe源设置iframe高度
- 在跨域环境中设置IFRAME的高度和宽度
- 如何设置iframe在使用jQuery加载完成后自动平滑滚动到底部
- 基于内容使用Javascript设置iframe高度
- 根据iFrame的内容设置iFrame高度
- 如何设置iframe内容的高度和宽度
- 动态设置iframe高度;不处理ie和chrome
- 如何设置iframe's在firefox扩展对话框中的src
- 设置iframe's window.external成员通过javascript
- 如何根据内容设置iframe的高度
- 设置iFrame src属性为编码的数据URI与javascript在chrome