1
0
Fork 0
forked from 0x2620/oxjs

move video GC workaround into VideoElement

This commit is contained in:
j 2014-02-09 06:06:43 +00:00
commit 9da1540653
2 changed files with 11 additions and 3 deletions

View file

@ -151,6 +151,7 @@ Ox.VideoElement = function(options, self) {
}
},
timeupdate: function() {
//fixme: use setInterval(...,30); to be more accurate
if (self.video == this) {
if (self.items[self.currentItem]
&& self.items[self.currentItem].out
@ -443,6 +444,16 @@ Ox.VideoElement = function(options, self) {
return that;
};
that.superRemove = that.remove;
that.remove = function() {
//Chrome does not properly release resources, reset manually
//http://code.google.com/p/chromium/issues/detail?id=31014
self.$videos.forEach(function($video) {
$video.attr({src: ''});
});
return that.superRemove.apply(that, arguments);
}
/*@
videoHeight <f> get videoHeight
@*/