如何在我的幻灯片上设置iframe视频?

时间:2021-11-12 18:57:55

Here is my http://jsfiddle.net/j88u02o2/59/

这是我的http://jsfiddle.net/j88u02o2/59/

This is script for slider:

这是slider的脚本:

$(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 })
        });

Now everything working fine, Now i need to add iframe video to my slideshow like as caption.

现在一切都很好,现在我需要将iframe视频添加到幻灯片的标题中。

My video size 420x234 pixels, Here is the code for iframe video:

我的视频大小为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> 

But i am blank how can i add in my existing code.

但我还是一片空白,我如何添加我现有的代码。

Can anybody help me to achieve this?

有人能帮我实现这个目标吗?

Thanks in advance.

提前谢谢。

1 个解决方案

#1


0  

Here is my answer:

这是我的回答:

<script>
  wistiaEmbed = Wistia.embed("bqur1fvyag", {
    videoFoam: {
    maxWidth: 420,
    maxHeight: 234
     },
    plugin: {
      "socialbar-v1": {
        buttons: ""
      }
    }
  });
</script>

#1


0  

Here is my answer:

这是我的回答:

<script>
  wistiaEmbed = Wistia.embed("bqur1fvyag", {
    videoFoam: {
    maxWidth: 420,
    maxHeight: 234
     },
    plugin: {
      "socialbar-v1": {
        buttons: ""
      }
    }
  });
</script>