First of all on computer browsers everythings is ok I have the following problem only on mobile!!
I have html video like this:
<video id="myVid" poster="poster.png" muted autoplay loop>
<source src="vid.webm" type='video/webm'>
<source src="vid.mp4" type='video/mp4'>
</video>
It's not autoplayed on mobile so i have to force play it using javascript: I used
$('#myVid').click(function () {
$('#myVid').get(0).play();
});
It's working but it does not working on $(document).ready() like:
$(document).ready(function () {
$('#myVid').get(0).play();
});