BIDEO.js全屏响应式背景视频插件

来源:https://www.sucaihuo.com/js/1440.html 2017-03-09 06:55浏览(3332) 收藏

BIDEO.js是一款功能强大的jQuery视频插件,支持自定义视频类型,初始化回调,自动跳转尺寸和是否自动播放,而且还可自定义播放和停止按钮定义,是否支持手机站浏览
BIDEO.js全屏响应式背景视频插件
分类:手机特效 > 视频播放 难易:初级
查看演示 下载资源 下载积分: 20 积分

Bideo视频调用和配置方法

var bv = new Bideo();
bv.init({
    // Video element
    videoEl: document.querySelector('#background_video'),
    // Container element
    container: document.querySelector('body'),
    // Resize
    resize: true,
    // autoplay: false,

    isMobile: window.matchMedia('(max-width: 768px)').matches,
    playButton: document.querySelector('#play'),
    pauseButton: document.querySelector('#pause'),
    // Array of objects containing the src and type
    // of different video formats to add
    src: [
        {
            src: 'night.mp4',
            type: 'video/mp4'
        },
        {
            src: 'night.webm',
            type: 'video/webm;codecs="vp8, vorbis"'
        }
    ],
    // What to do once video loads (initial frame)
    onLoad: function() {
        document.querySelector('#video_cover').style.display = 'none';
    }
});
标签: 视频
评论0
头像

系统已开启自动识别垃圾评论机制,识别到的自动封号,下载出错或者资源有问题请联系全栈客服QQ 1915635791

1 2