fixing some video editor bugs (focus, markers)
This commit is contained in:
parent
f311e05412
commit
78a4229689
3 changed files with 10 additions and 16 deletions
|
@ -27,7 +27,6 @@ Ox.forEach($('<div>'), function(val, key) {
|
||||||
if (Ox.isFunction(val)) {
|
if (Ox.isFunction(val)) {
|
||||||
Ox.JQueryElement.prototype[key] = function() {
|
Ox.JQueryElement.prototype[key] = function() {
|
||||||
var args = arguments, id, ret, that = this;
|
var args = arguments, id, ret, that = this;
|
||||||
if (key == 'size') Ox.print('size', args)
|
|
||||||
Ox.forEach(args, function(arg, i) {
|
Ox.forEach(args, function(arg, i) {
|
||||||
// if an ox object was passed
|
// if an ox object was passed
|
||||||
// then pass its $element instead
|
// then pass its $element instead
|
||||||
|
|
|
@ -136,8 +136,9 @@ Ox.VideoEditor = function(options, self) {
|
||||||
|
|
||||||
self.$editor = new Ox.Element()
|
self.$editor = new Ox.Element()
|
||||||
.addClass('OxVideoEditor')
|
.addClass('OxVideoEditor')
|
||||||
.click(function() {
|
.click(function(e) {
|
||||||
that.gainFocus()
|
var $target = $(e.target);
|
||||||
|
!$target.is('.OxPosition') && !$target.is('input') && that.gainFocus();
|
||||||
});
|
});
|
||||||
|
|
||||||
self.sizes = getSizes();
|
self.sizes = getSizes();
|
||||||
|
|
|
@ -405,14 +405,6 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
src: Ox.UI.PATH + 'png/videoMarker' + titleCase + '.png'
|
src: Ox.UI.PATH + 'png/videoMarker' + titleCase + '.png'
|
||||||
})
|
})
|
||||||
.appendTo(self.$videoContainer);
|
.appendTo(self.$videoContainer);
|
||||||
// fixme: there's a bug in jquery and/or webkit
|
|
||||||
// normally, setMarker() should properly .show()
|
|
||||||
// the in markers of the in player
|
|
||||||
// or the out markers of the out player,
|
|
||||||
// but only setting css display seems to work
|
|
||||||
if (self.options.type == point) {
|
|
||||||
self.$pointMarker[point][edge].css({display: 'block'});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1397,7 +1389,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
self.$video
|
self.$video
|
||||||
.one({
|
.one({
|
||||||
load: function() {
|
load: function() {
|
||||||
Ox.print('IMAGE LOADED', self.options.video(self.options.position))
|
Ox.print('IMAGE LOADED', self.options.video(self.options.position, self.options.width))
|
||||||
hideLoadingIcon();
|
hideLoadingIcon();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -1492,9 +1484,6 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
} else {
|
} else {
|
||||||
setPosition(self.options.position, 'video');
|
setPosition(self.options.position, 'video');
|
||||||
}
|
}
|
||||||
that.triggerEvent('position', {
|
|
||||||
position: self.options.position
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function playInToOut() {
|
function playInToOut() {
|
||||||
|
@ -1550,8 +1539,10 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
Ox.forEach(self.$pointMarker, function(markers, point) {
|
Ox.forEach(self.$pointMarker, function(markers, point) {
|
||||||
Ox.forEach(markers, function(marker) {
|
Ox.forEach(markers, function(marker) {
|
||||||
//Ox.print(self.options.position, self.options[point], isEqual(self.options.position, self.options[point]))
|
//Ox.print(self.options.position, self.options[point], isEqual(self.options.position, self.options[point]))
|
||||||
|
// fixme: there's a bug in jquery and/or webkit
|
||||||
|
// on load, show() doesn't work
|
||||||
isEqual(self.options.position, self.options[point]) ?
|
isEqual(self.options.position, self.options[point]) ?
|
||||||
marker.show() : marker.hide();
|
marker.css({display: 'block'}) : marker.hide();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1591,6 +1582,9 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
//showLoadingIcon();
|
//showLoadingIcon();
|
||||||
loadImage();
|
loadImage();
|
||||||
}
|
}
|
||||||
|
that.triggerEvent('position', {
|
||||||
|
position: self.options.position
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function setResolution() {
|
function setResolution() {
|
||||||
|
|
Loading…
Reference in a new issue