Html5视频在关闭弹出视频后如何暂停?

时间:2018-06-21 04:08:50

标签: javascript jquery

这是模态展示功能

var _ouibounce = ouibounce(document.getElementById('popup-modal'), {
        aggressive: false,
        timer: 0,
        cookieExpire:1,
        delay:100,
        callback: function() { $('#popup-modal').show(); }
    });

这是我的模式关闭函数

$(document).mouseup(function (e) {
    if (e.target.className == 'underlay'){
        $('#popup-modal').hide();
    }

    $('#popup-modal .modal-footer').on('click', function() {
        $('#popup-modal').pause();      
    });
});

关闭弹出视频后如何暂停视频?

1 个答案:

答案 0 :(得分:0)

jQuery这应该工作:

$("#html_video_id").get(0).pause();

或普通:

document.getElementById('html_video_id').pause();