vendor/assets/javascripts/webshims/shims/jme/mediacontrols-lazy.js in webshims-rails-1.14.5 vs vendor/assets/javascripts/webshims/shims/jme/mediacontrols-lazy.js in webshims-rails-1.14.6
- old
+ new
@@ -27,10 +27,12 @@
return '<li class="'+ className +'" role="presentation"><button role="menuitemcheckbox" type="button" tabindex="-1">'+ track.label + lang +'</button></li>';
})
;
return '<div><ul role="presentation">' + items.join('') +'</ul></div>';
};
+ var domPrefixes = webshims.domPrefixes;
+ var prefixed = webshims.prefixed;
if(!$.fn.wsTouchClick){
$.fn.wsTouchClick = (function(){
@@ -974,30 +976,11 @@
addChapterRelatives(chapterList);
track[name] = chapterList;
return chapterList;
}
- var domPrefixes = ["webkit", "moz", "o", "ms"];
- function prefixed(prop, obj){
- var i, testProp;
- var ret = false;
- if(obj[prop]){
- ret = prop;
- }
- if(!ret){
- prop = prop.charAt(0).toUpperCase() + prop.slice(1);
- for(i = 0; i < domPrefixes.length; i++){
- testProp = domPrefixes[i]+prop;
- if(testProp in obj){
- ret = testProp;
- break;
- }
- }
- }
- return ret;
- }
$.jme.defineMethod('getChapterTree', getChapterTree);
$.jme.defineMethod('concerningRange', function(type, time){
var elem = this;
@@ -1048,10 +1031,10 @@
}
if(sec == null){
data = $.jme.data(this);
sec = $.prop(data.media, 'duration');
}
- if(!sec){
+ if(!sec || !isFinite(sec)){
sec = 0;
}
var formated = [];
var frac;
for(var i = 0, len = format.length; i < len; i++){