javascript - HTML5 video loading time -


I am trying to calculate the time of measurement of html5 video. I use javascript to use html5 video event loadstart and canplaythrough :

  media.addEventListener ('loadstart'getStartTime () {SetTime = New date (.) GetTime ();}, false)   

and end with the same event set to be set as canplaythrough . I did not get any data though

Can someone please direct me how to measure the time of video loading using javascript.

Thank you for your response, but the solution is to trust me using jQuery. However, I was thinking that it is possible with javascript. I've attached a copy of my code:

Load the load video () {var timeNow = Date.now (), timestartlod, timefinal load; My videos = new array (); MyVideos [0] = "trailer.mp34"; MyVideos [1] = "trailer.ogg"; MyVideos [2] = "Trailer. M4V"; Var video id = document.getElementById ('idForVideo'); Var video = document.createElement ('video'); (Var i = 0; i

} However I get undefined for both timestrough load and time FinishLoad. The HTML code in my HTML body has the Load method link.

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -