I have a HTML code like this:
... <video id="abc" preload="auto" autoplay="autoplay" loop="loop" webkit-playsinline="">
<source src="3.mp4" type="video/mp4">
</video> ...
And I used this JS code:
$(document).ready(function () {
"use strict";
$("#abc").load(function () {
console.log(3);
});
});
I wanna run that function when the video loads. The JS code works with img
tag but not with video
tag. I want it to work like the img
tag. Like I want it not to run when it loads videos from cache.
How can I do that?