in video editor, pass muted/volume options downwards and muted/volume events upwards

This commit is contained in:
rlx 2011-11-05 15:01:18 +00:00
parent 730712e9ba
commit 49adfa57ae

View file

@ -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);