How to add youtube and vimeo videos as background in jquery masterslider

时间:2016-08-13 13:24:47

标签: jquery youtube vimeo masterslider

I try to add youtube and vimeo videos as online link.

<div class="ms-slide slide-video" data-delay="15">
    <img src="masterslider/blank.gif" alt="" data-src="img/video/video-bg.jpg">
    <video data-autopause="false" data-mute="true" data-loop="true" >
        <source id="nOEw9iiopwI" src="http://www.youtube.com/watch?v=nOEw9iiopwI" type="video/youtube"/>
    </video>
</div>

1 个答案:

答案 0 :(得分:0)

You need to get hold of the video file and host it yourself. Then follow the instructions from the docs --

        <!-- slide background -->
        <img src="masterslider/blank.gif" data-src="masterslider/images/1.jpg" alt="lorem ipsum dolor sit"/>     

        <!-- slide background video -->
        <video data-autopause="false" data-mute="true" data-loop="true" data-fill-mode="fill">
            <source id="mp4" src="http://media.w3.org/2010/05/bunny/trailer.mp4" type="video/mp4"/>
            <source id="ogv" src="http://media.w3.org/2010/05/bunny/trailer.ogv" type="video/ogg"/>
        </video>

    </div>
    <!-- end of slide -->                    
</div>
<!-- end of masterslider -->