VideoElement: patch removeElement, not remove

This commit is contained in:
rlx 2014-09-23 21:03:32 +02:00
parent 39d1b034ab
commit 06c21e0a46

View file

@ -468,15 +468,14 @@ Ox.VideoElement = function(options, self) {
return that; return that;
}; };
self.superRemove = that.remove.bind(that); that.removeElement = function() {
that.remove = function() {
clearInterval(self.timeupdate); clearInterval(self.timeupdate);
//Chrome does not properly release resources, reset manually //Chrome does not properly release resources, reset manually
//http://code.google.com/p/chromium/issues/detail?id=31014 //http://code.google.com/p/chromium/issues/detail?id=31014
self.$videos.forEach(function($video) { self.$videos.forEach(function($video) {
$video.attr({src: ''}); $video.attr({src: ''});
}); });
return self.superRemove(arguments); return Ox.Element.prototype.removeElement.apply(that, arguments);
}; };
/*@ /*@