I want to detect through jQuery or Javascript when a specific video inside an html5 tag has been entirely loaded (I mean, downloaded into the cache of the browser). The video has the preload = "auto" attribute.
I tried everything in my power to do this (I'm a beginner) with no luck. Can't seem to find any event I could listen to, is there any way to do this?
PS: the only thing I came across is the network_state property of the video object, but the references around the web doesn't seem to agree with the state it returns, and when I tried it I didn't find a state for "LOADED".
EDIT: I found an event I think I can use, the canPlayThrough. I tested it and it seemed to work, but I'm not sure if it really tells me that the video has been totally loaded, or just that it loaded enough data to start playing (which is no good).