From 49adfa57aea3a6f13c10d03e8a8d918a53679f63 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Sat, 5 Nov 2011 15:01:18 +0000 Subject: [PATCH] in video editor, pass muted/volume options downwards and muted/volume events upwards --- source/Ox.UI/js/Video/Ox.VideoEditor.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/source/Ox.UI/js/Video/Ox.VideoEditor.js b/source/Ox.UI/js/Video/Ox.VideoEditor.js index afb3ca77..800e251e 100644 --- a/source/Ox.UI/js/Video/Ox.VideoEditor.js +++ b/source/Ox.UI/js/Video/Ox.VideoEditor.js @@ -28,6 +28,7 @@ Ox.VideoEditor = function(options, self) { 'in': 0, height: 0, layers: [], + muted: false, out: 0, position: 0, posterFrame: 0, @@ -39,6 +40,7 @@ Ox.VideoEditor = function(options, self) { videoRatio: 16/9, videoSize: 'small', video: '', + volume: 1, width: 0 }) .options(options || {}) @@ -180,6 +182,7 @@ Ox.VideoEditor = function(options, self) { height: self.sizes.player[i].height, id: 'player' + Ox.toTitleCase(type), 'in': self.options['in'], + muted: self.options.muted, out: self.options.out, paused: true, position: type == 'play' ? self.options.position : self.options[type], @@ -190,6 +193,7 @@ Ox.VideoEditor = function(options, self) { subtitles: self.options.subtitles, type: type, video: type == 'play' ? self.options.video : self.options.getFrameURL, + volume: self.options.volume, width: self.sizes.player[i].width }) .css({ @@ -197,8 +201,14 @@ Ox.VideoEditor = function(options, self) { top: self.sizes.player[i].top + 'px' }) .bindEvent(type == 'play' ? { + muted: function(data) { + that.triggerEvent('muted', data); + }, position: changePlayer, - size: toggleSize + size: toggleSize, + volume: function(data) { + that.triggerEvent('volume', data); + } } : { gotopoint: function() { goToPoint(type);