T
T
Timofey Alekseev2018-11-11 01:00:47
JavaScript
Timofey Alekseev, 2018-11-11 01:00:47

What's with the script?

There is html5 video on the background, autoplay ignores it.
I solved the issue with a js script, but there is some kind of game in general.
This is how it doesn't work:

$(document).ready(function () {
    $(".bg-video")[0].play();
});

And this is how it works:
$(document).ready(function () {
    $(document).ready(function () {
        $(".bg-video")[0].play();
    });
});


What kind of game and why is it so, because this should not be

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