vendor/assets/javascripts/webshims/shims/track.js in webshims-rails-0.4.6 vs vendor/assets/javascripts/webshims/shims/track.js in webshims-rails-0.4.7
- old
+ new
@@ -1,9 +1,10 @@
jQuery.webshims.register('track', function($, webshims, window, document, undefined){
"use strict";
var mediaelement = webshims.mediaelement;
var id = new Date().getTime();
+ var ADDBACK = $.fn.addBack ? 'addBack' : 'andSelf';
//descriptions are not really shown, but they are inserted into the dom
var showTracks = {subtitles: 1, captions: 1, descriptions: 1};
var notImplemented = function(){
webshims.error('not implemented yet');
};
@@ -387,10 +388,10 @@
});
});
}
trackData = webshims.data(track, 'trackData', {track: obj});
- mediaelement.loadTextTrack(mediaelem, track, trackData, ($.prop(track, 'default') && $(track).siblings('track[default]').andSelf()[0] == track));
+ mediaelement.loadTextTrack(mediaelem, track, trackData, ($.prop(track, 'default') && $(track).siblings('track[default]')[ADDBACK]()[0] == track));
} else {
if(supportTrackMod){
copyProps.forEach(function(copyProp){
webshims.defineProperty(obj, copyName[copyProp] || copyProp, {
value: track[copyProp],
\ No newline at end of file