in video player, separate playing event from position event, so controls that need live updates can bind to playing, while others can safely bind to position
This commit is contained in:
parent
d152c4b48b
commit
291b75c43b
4 changed files with 22 additions and 3 deletions
|
|
@ -1649,7 +1649,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
} else {
|
||||
setPosition(self.options.position, 'video');
|
||||
}
|
||||
that.triggerEvent('position', {
|
||||
that.triggerEvent('playing', {
|
||||
position: self.options.position
|
||||
});
|
||||
}
|
||||
|
|
@ -2153,6 +2153,12 @@ Ox.VideoPlayer = function(options, self) {
|
|||
if (self.$playButton && from != 'button') {
|
||||
self.$playButton.toggleTitle();
|
||||
}
|
||||
that.triggerEvent('paused', {
|
||||
paused: self.options.paused
|
||||
});
|
||||
self.options.paused && that.triggerEvent('position', {
|
||||
position: self.options.position
|
||||
});
|
||||
}
|
||||
|
||||
function togglePlayIcon() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue