vendor/assets/javascripts/webshims/shims/combos/23.js in webshims-rails-1.12.5 vs vendor/assets/javascripts/webshims/shims/combos/23.js in webshims-rails-1.12.7
- old
+ new
@@ -236,11 +236,10 @@
});
};
var wsCfg = webshims.cfg;
var options = wsCfg.mediaelement;
- var hasFullTrackSupport;
var hasSwf;
if(!options){
webshims.error("mediaelement wasn't implemented but loaded");
return;
}
@@ -278,15 +277,13 @@
bugs.track = true;
}
}
})();
}
- hasFullTrackSupport = Modernizr.track && !bugs.track;
webshims.register('mediaelement-core', function($, webshims, window, document, undefined, options){
hasSwf = swfmini.hasFlashPlayerVersion('10.0.3');
- $('html').addClass(hasSwf ? 'swf' : 'no-swf');
var mediaelement = webshims.mediaelement;
mediaelement.parseRtmp = function(data){
var src = data.src.split('://');
var paths = src[1].split('/');
@@ -661,10 +658,13 @@
var data = webshims.data(this, 'mediaelement');
selectSource(this, data);
if(hasNative && (!data || data.isActive == 'html5') && supLoad.prop._supvalue){
supLoad.prop._supvalue.apply(this, arguments);
}
+ if(!loadTrackUi.loaded && $('track', this).length){
+ loadTrackUi();
+ }
$(this).triggerHandler('wsmediareload');
}
}
});
nativeCanPlayType[nodeName] = webshims.defineNodeNameProperty(nodeName, 'canPlayType', {
@@ -731,16 +731,10 @@
}
});
}
};
- if(hasFullTrackSupport){
- webshims.defineProperty(TextTrack.prototype, 'shimActiveCues', {
- get: function(){
- return this._shimActiveCues || this.activeCues;
- }
- });
- }
+
//set native implementation ready, before swf api is retested
if(hasNative){
webshims.isReady('mediaelement-core', true);
initMediaElements();
webshims.ready('WINDOWLOAD mediaelement', loadThird);