fix #493 (error when removing a not-yet-loaded video from the dom)
This commit is contained in:
parent
23c319d95a
commit
3407f36d12
1 changed files with 4 additions and 2 deletions
|
@ -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');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue