1
0
Fork 0
forked from 0x2620/oxjs

misc fixes

This commit is contained in:
rlx 2011-09-29 17:25:50 +00:00
commit 8ea49fab73
10 changed files with 41 additions and 16 deletions

View file

@ -10,6 +10,7 @@ Ox.VideoPreview = function(options, self) {
fps: 25,
frameRatio: 16/9,
height: 256,
position: void 0,
scaleToFill: false,
timeline: '',
width: 256
@ -26,7 +27,7 @@ Ox.VideoPreview = function(options, self) {
self.$frame = $('<img>')
.addClass('OxFrame')
.attr({src: self.options.getFrame()})
.attr({src: self.options.getFrame(self.options.position)})
.css(getFrameCSS())
.appendTo(that.$element);
@ -50,7 +51,7 @@ Ox.VideoPreview = function(options, self) {
click: click,
mouseenter: startLoading,
mouseleave: function() {
self.$frame.attr({src: self.options.getFrame()});
self.$frame.attr({src: self.options.getFrame(self.options.position)});
stopLoading();
}
})
@ -121,7 +122,9 @@ Ox.VideoPreview = function(options, self) {
self.setOption = function(key, value) {
if (key == 'height') {
that.css({height: value + 'px'});
self.$frame.css(getFrameCSS());
self.$frame.css(getFrameCSS());
} else if (key == 'position') {
self.$frame.attr({src: self.options.getFrame(value)});
} else if (key == 'width') {
that.css({width: value + 'px'});
self.$frame.attr({src: self.options.getFrame()})