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 and end with the same event set to be set as 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. loadstart and
canplaythrough :
media.addEventListener ('loadstart'getStartTime () {SetTime = New date (.) GetTime ();}, false)
canplaythrough . I did not get any data though
Comments
Post a Comment