some more fixes

This commit is contained in:
rlx 2011-08-19 20:37:58 +00:00
parent d0d1b94228
commit 32f4626a50
3 changed files with 23 additions and 17 deletions

View file

@ -107,7 +107,6 @@ Ox.SmallVideoTimelineImage = function(options, self) {
height: height height: height
})[0], })[0],
context = canvas.getContext('2d'), context = canvas.getContext('2d'),
Ox.print('WIDTH/HEIGHT', width, height)
imageData = context.createImageData(width, height), imageData = context.createImageData(width, height),
data = imageData.data; data = imageData.data;
if (image == 'results') { if (image == 'results') {

View file

@ -177,11 +177,17 @@ Ox.VideoPanelPlayer = function(options, self) {
} }
function resizeAnnotations(event, data) { function resizeAnnotations(event, data) {
// called on annotations resize
self.options.annotationsSize = data; self.options.annotationsSize = data;
resizeVideoAndControls(); self.$video.options({
width: getPlayerWidth()
});
self.$timeline.options({
width: getTimelineWidth()
});
} }
function resizeendAnnotations(data) { function resizeendAnnotations(event, data) {
self.options.annotationsSize = data; self.options.annotationsSize = data;
that.triggerEvent('resizeannotations', { that.triggerEvent('resizeannotations', {
annotationsSize: self.options.annotationsSize annotationsSize: self.options.annotationsSize

View file

@ -852,10 +852,6 @@ Ox.VideoPlayer = function(options, self) {
}) })
.appendTo(self.$find); .appendTo(self.$find);
self.$findInput.children('input').css({
width: (self.positionWidth - 6) + 'px',
})
self.$clearButton = Ox.Button({ self.$clearButton = Ox.Button({
disabled: !self.options.find, disabled: !self.options.find,
style: 'symbol', style: 'symbol',
@ -1042,7 +1038,7 @@ Ox.VideoPlayer = function(options, self) {
}; };
} else if (element == 'find') { } else if (element == 'find') {
css = { css = {
width: Math.min(208, self.width) + 'px' width: Math.min(216, self.width) + 'px'
}; };
} else if (element == 'loadingIcon') { } else if (element == 'loadingIcon') {
css = { css = {
@ -1164,7 +1160,7 @@ Ox.VideoPlayer = function(options, self) {
} }
function getProgressImageURL() { function getProgressImageURL() {
Ox.print('---', self.timelineImageWidth) //Ox.print('---', self.timelineImageWidth)
if (!self.timelineImageWidth) return; if (!self.timelineImageWidth) return;
var width = self.timelineImageWidth, var width = self.timelineImageWidth,
height = self.barHeight, height = self.barHeight,
@ -1234,6 +1230,9 @@ Ox.VideoPlayer = function(options, self) {
.bindEvent({ .bindEvent({
position: function(data) { position: function(data) {
setPosition(data.position, 'timeline'); setPosition(data.position, 'timeline');
that.triggerEvent('position', {
position: self.options.position
});
} }
}); });
//Ox.print('??', $timeline.find('.OxInterface')) //Ox.print('??', $timeline.find('.OxInterface'))
@ -1647,9 +1646,12 @@ Ox.VideoPlayer = function(options, self) {
}); });
setSize(self.$spaceBottom, getCSS('spaceBottom'), animate); setSize(self.$spaceBottom, getCSS('spaceBottom'), animate);
setSize(self.$find, getCSS('find'), animate, function() { setSize(self.$find, getCSS('find'), animate, function() {
Ox.print('FIND......', Math.min(128, self.width - 80)) var width = Math.min(128, self.width - 88);
self.$findInput.options({ self.$findInput.options({
width: Math.min(128, self.width - 80) width: width
});
self.$findInput.children('input').css({
width: (width - 6) + 'px',
}); });
}); });
setSize(self.$volume, getCSS('volume'), animate, function() { setSize(self.$volume, getCSS('volume'), animate, function() {
@ -1674,14 +1676,14 @@ Ox.VideoPlayer = function(options, self) {
} }
function setSubtitleText() { function setSubtitleText() {
Ox.print('setSubTx', self.subtitle, self.options.find) //Ox.print('setSubTx', self.subtitle, self.options.find)
self.$subtitle.html( self.$subtitle.html(
self.subtitle ? self.subtitle ?
Ox.highlight(self.subtitle, self.options.find, 'OxHighlight') Ox.highlight(self.subtitle, self.options.find, 'OxHighlight')
.replace(/\n/g, '<br/>') : '&nbsp;<br/>&nbsp;' .replace(/\n/g, '<br/>') : '&nbsp;<br/>&nbsp;'
// FIXME: weird bug, only in fullscreen, only in chrome // FIXME: weird bug, only in fullscreen, only in chrome
); );
Ox.print('?!?', self.$subtitle.css('bottom'), self.$subtitle.height()) //Ox.print('?!?', self.$subtitle.css('bottom'), self.$subtitle.height())
} }
function changeVolumeBy(num) { function changeVolumeBy(num) {
@ -1773,10 +1775,10 @@ Ox.VideoPlayer = function(options, self) {
} }
function submitFindInput(value, hasPressedEnter) { function submitFindInput(value, hasPressedEnter) {
Ox.print('submitFindInput', value, hasPressedEnter) //Ox.print('submitFindInput', value, hasPressedEnter)
self.options.find = value; self.options.find = value;
self.results = find(self.options.find); self.results = find(self.options.find);
Ox.print('results', self.results.length); //Ox.print('results', self.results.length);
if (self.$find) { if (self.$find) {
self.$results.html(self.results.length); self.$results.html(self.results.length);
self.$previousButton.options({ self.$previousButton.options({
@ -1820,7 +1822,7 @@ Ox.VideoPlayer = function(options, self) {
function submitPositionInput() { function submitPositionInput() {
self.$positionInput.hide(); self.$positionInput.hide();
self.$position.html('').show(); self.$position.html('').show();
Ox.print('###', parsePositionInput(self.$positionInput.options('value'))) //Ox.print('###', parsePositionInput(self.$positionInput.options('value')))
setPosition(parsePositionInput(self.$positionInput.options('value'))); setPosition(parsePositionInput(self.$positionInput.options('value')));
if (self.playOnSubmit) { if (self.playOnSubmit) {
togglePaused(); togglePaused();
@ -2013,7 +2015,6 @@ Ox.VideoPlayer = function(options, self) {
if (key == 'fullscreen') { if (key == 'fullscreen') {
toggleFullscreen(); toggleFullscreen();
} else if (key == 'height' || key == 'width') { } else if (key == 'height' || key == 'width') {
Ox.print('!!!!!!!!!!!!!', key, value)
setSizes(); setSizes();
} else if (key == 'in' || key == 'out') { } else if (key == 'in' || key == 'out') {
self.options.paused && setMarkers(); self.options.paused && setMarkers();