fix #493 (error when removing a not-yet-loaded video from the dom)

This commit is contained in:
rlx 2012-02-17 10:41:38 +00:00
parent 23c319d95a
commit 3407f36d12

View file

@ -176,8 +176,10 @@ Ox.VideoElement = function(options, self) {
}, },
stop: function() { stop: function() {
// custom event to be triggered on removal from the DOM // custom event to be triggered on removal from the DOM
if (self.video) {
self.video.pause(); self.video.pause();
self.video.src = ''; self.video.src = '';
}
that.triggerEvent('ended'); that.triggerEvent('ended');
} }
}) })