D
D
drtvader2017-02-07 10:51:36
css
drtvader, 2017-02-07 10:51:36

Why doesn't Autoplay work in Safari?

Why doesn't autoplay youtube work?
How can you get around?

function PlayVideo() {
    $(".js-video").bind('click', function(e) {
        e.preventDefault();
        $(".js-popup").fadeIn();
        $('#video')[0].contentWindow.postMessage('{"event":"command","func":"' + 'playVideo' + '","args":""}', '*');

        $("body").delay(400).addClass("js-modal");
    });
};

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question