Skip to content

Commit

Permalink
Minor Bug Fix: The duration is now correct in iOS Safari when the med…
Browse files Browse the repository at this point in the history
…ia changes.
  • Loading branch information
thepag committed Apr 5, 2011
1 parent 5d2f262 commit de22c88
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions jquery.jplayer/jquery.jplayer.js
Expand Up @@ -8,7 +8,7 @@
* - http://www.gnu.org/copyleft/gpl.html
*
* Author: Mark J Panaghiston
* Version: 2.0.6
* Version: 2.0.7
* Date: 4th April 2011
*/

Expand Down Expand Up @@ -192,7 +192,7 @@
$.jPlayer.prototype = {
count: 0, // Static Variable: Change it via prototype.
version: { // Static Object
script: "2.0.6",
script: "2.0.7",
needFlash: "2.0.0",
flash: "unknown"
},
Expand Down Expand Up @@ -788,7 +788,10 @@
},
_getHtmlStatus: function(media, override) {
var ct = 0, d = 0, cpa = 0, sp = 0, cpr = 0;


if(media.duration) { // Fixes the duration bug in iOS, where the durationchange event occurs when media.duration is not always correct.
this.status.duration = media.duration;
}
ct = media.currentTime;
cpa = (this.status.duration > 0) ? 100 * ct / this.status.duration : 0;
if((typeof media.seekable === "object") && (media.seekable.length > 0)) {
Expand Down

0 comments on commit de22c88

Please sign in to comment.