From ef9040ba24ad6ba7bd54f41dfe50a1bd651cf83b Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Mon, 26 Sep 2011 19:45:36 +0000 Subject: [PATCH] fix video widget listeners and triggers --- source/Ox.UI/js/Video/Ox.VideoEditor.js | 5 +++++ source/Ox.UI/js/Video/Ox.VideoPanelPlayer.js | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/source/Ox.UI/js/Video/Ox.VideoEditor.js b/source/Ox.UI/js/Video/Ox.VideoEditor.js index a586ccda..6bfb5dcd 100644 --- a/source/Ox.UI/js/Video/Ox.VideoEditor.js +++ b/source/Ox.UI/js/Video/Ox.VideoEditor.js @@ -997,6 +997,11 @@ Ox.VideoEditor = function(options, self) { function togglePaused() { self.$player[0].togglePaused(); + /* fixme + self.$player[0].options('paused') && that.triggerEvent('position', { + + }); + */ } function toggleSize() { diff --git a/source/Ox.UI/js/Video/Ox.VideoPanelPlayer.js b/source/Ox.UI/js/Video/Ox.VideoPanelPlayer.js index 758eb507..a15d7caf 100644 --- a/source/Ox.UI/js/Video/Ox.VideoPanelPlayer.js +++ b/source/Ox.UI/js/Video/Ox.VideoPanelPlayer.js @@ -163,6 +163,7 @@ Ox.VideoPanelPlayer = function(options, self) { function changeTimeline(data) { self.options.position = data.position; self.$video.options({position: self.options.position}); + that.triggerEvent('position', {position: self.options.position}); } function getPlayerHeight() { @@ -252,7 +253,12 @@ Ox.VideoPanelPlayer = function(options, self) { height: getPlayerHeight() }); } else if (key == 'position') { - self.$video.position(value); + self.$video.options({ + position: value + }); + self.$timeline.options({ + position: value + }); } else if (key == 'width') { self.$video.options({ width: getPlayerWidth()