forked from 0x2620/oxjs
use Ox.Log
This commit is contained in:
parent
92d25b6776
commit
dce2843303
50 changed files with 276 additions and 276 deletions
|
|
@ -130,7 +130,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
.options(options || {})
|
||||
.addClass('OxVideoPlayer');
|
||||
|
||||
Ox.print('VIDEO PLAYER OPTIONS', self.options)
|
||||
Ox.Log('Video', 'VIDEO PLAYER OPTIONS', self.options)
|
||||
|
||||
Ox.UI.$window.bind({
|
||||
resize: function() {
|
||||
|
|
@ -252,12 +252,12 @@ Ox.VideoPlayer = function(options, self) {
|
|||
mouseenter: function() {
|
||||
showControls();
|
||||
self.mouseHasLeft = false;
|
||||
//Ox.print('MOUSE HAS ENTERED')
|
||||
//Ox.Log('Video', 'MOUSE HAS ENTERED')
|
||||
},
|
||||
mouseleave: function() {
|
||||
hideControls();
|
||||
self.mouseHasLeft = true;
|
||||
//Ox.print('MOUSE HAS LEFT')
|
||||
//Ox.Log('Video', 'MOUSE HAS LEFT')
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1228,13 +1228,13 @@ Ox.VideoPlayer = function(options, self) {
|
|||
function getPosition(e) {
|
||||
// fixme: no offsetX in firefox???
|
||||
if ($.browser.mozilla) {
|
||||
//Ox.print(e, e.layerX - 56)
|
||||
//Ox.Log('Video', e, e.layerX - 56)
|
||||
return Ox.limit(
|
||||
(e.layerX - 48 - self.barHeight / 2) / self.timelineImageWidth * self.$video.duration(),
|
||||
0, self.$video.duration()
|
||||
);
|
||||
} else {
|
||||
/*Ox.print(e.offsetX, Ox.limit(
|
||||
/*Ox.Log('Video', e.offsetX, Ox.limit(
|
||||
(e.offsetX - self.barHeight / 2) / self.timelineImageWidth * self.video.duration,
|
||||
0, self.video.duration
|
||||
))*/
|
||||
|
|
@ -1272,7 +1272,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
}
|
||||
|
||||
function getProgressImageURL() {
|
||||
//Ox.print('---', self.timelineImageWidth)
|
||||
//Ox.Log('Video', '---', self.timelineImageWidth)
|
||||
if (!self.timelineImageWidth) return;
|
||||
var width = self.timelineImageWidth,
|
||||
height = self.barHeight,
|
||||
|
|
@ -1347,7 +1347,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
});
|
||||
}
|
||||
});
|
||||
//Ox.print('??', $timeline.find('.OxInterface'))
|
||||
//Ox.Log('Video', '??', $timeline.find('.OxInterface'))
|
||||
$timeline.children().css({
|
||||
marginLeft: getTimelineLeft() + 'px'
|
||||
});
|
||||
|
|
@ -1472,7 +1472,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
}
|
||||
|
||||
function hideControls() {
|
||||
//Ox.print('hideControls');
|
||||
//Ox.Log('Video', 'hideControls');
|
||||
clearTimeout(self.interfaceTimeout);
|
||||
self.interfaceTimeout = setTimeout(function() {
|
||||
if (!self.exitFullscreen && !self.inputHasFocus && !self.mouseIsInControls) {
|
||||
|
|
@ -1546,7 +1546,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
|
||||
function loadedmetadata() {
|
||||
|
||||
Ox.print('LOADEDMETADATA')
|
||||
Ox.Log('Video', 'LOADEDMETADATA')
|
||||
|
||||
var hadDuration = !!self.options.duration;
|
||||
|
||||
|
|
@ -1565,7 +1565,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
self.out = self.options.playInToOut && self.out < self.$video.duration()
|
||||
? self.out : self.$video.duration();
|
||||
self.options.duration = self.out - self['in'];
|
||||
Ox.print('---------------------------------------- POS', self.options.position)
|
||||
Ox.Log('Video', '---------------------------------------- POS', self.options.position)
|
||||
//self.options.position = Ox.limit(self.options.position, self['in'], self.out);
|
||||
//self.$video.currentTime(self.options.position);
|
||||
|
||||
|
|
@ -1667,7 +1667,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
self.out = points[1];
|
||||
self.options.duration = self.out - self['in'];
|
||||
setPosition(self['in']);
|
||||
Ox.print('POINTSCHANGE', self['in'], self.out, self.options.position, self.options.duration)
|
||||
Ox.Log('Video', 'POINTSCHANGE', self['in'], self.out, self.options.position, self.options.duration)
|
||||
}
|
||||
|
||||
function progress() {
|
||||
|
|
@ -1691,34 +1691,34 @@ Ox.VideoPlayer = function(options, self) {
|
|||
}
|
||||
|
||||
function seeked() {
|
||||
Ox.print('XX seeked')
|
||||
Ox.Log('Video', 'XX seeked')
|
||||
clearTimeout(self.seekTimeout);
|
||||
self.seekTimeout = 0;
|
||||
Ox.print('XX hide')
|
||||
Ox.Log('Video', 'XX hide')
|
||||
hideLoadingIcon();
|
||||
self.$playIcon && self.$playIcon.show();
|
||||
}
|
||||
|
||||
function seeking() {
|
||||
Ox.print('XX seeking')
|
||||
Ox.Log('Video', 'XX seeking')
|
||||
if (!self.seekTimeout) {
|
||||
self.seekTimeout = setTimeout(function() {
|
||||
self.$playIcon && self.$playIcon.hide();
|
||||
Ox.print('XX show')
|
||||
Ox.Log('Video', 'XX show')
|
||||
showLoadingIcon();
|
||||
}, 250);
|
||||
}
|
||||
}
|
||||
|
||||
function setMarkers() {
|
||||
//Ox.print('SET MARKERS', self.options.position, self.options['in'], self.options.out, self.$pointMarker);
|
||||
//Ox.Log('Video', 'SET MARKERS', self.options.position, self.options['in'], self.options.out, self.$pointMarker);
|
||||
Ox.forEach(self.$posterMarker, function(marker) {
|
||||
isEqual(self.options.position, self.options.posterFrame) ?
|
||||
marker.show() : marker.hide();
|
||||
});
|
||||
Ox.forEach(self.$pointMarker, function(markers, point) {
|
||||
Ox.forEach(markers, function(marker) {
|
||||
//Ox.print(self.options.position, self.options[point], isEqual(self.options.position, self.options[point]))
|
||||
//Ox.Log('Video', 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]) ?
|
||||
|
|
@ -1863,14 +1863,14 @@ Ox.VideoPlayer = function(options, self) {
|
|||
}
|
||||
|
||||
function setSubtitleText() {
|
||||
//Ox.print('setSubTx', self.subtitle, self.options.find)
|
||||
//Ox.Log('Video', 'setSubTx', self.subtitle, self.options.find)
|
||||
self.$subtitle.html(
|
||||
self.subtitle ?
|
||||
Ox.highlight(self.subtitle, self.options.find, 'OxHighlight')
|
||||
.replace(/\n/g, '<br/>') : ' <br/> '
|
||||
// FIXME: weird bug, only in fullscreen, only in chrome
|
||||
);
|
||||
//Ox.print('?!?', self.$subtitle.css('bottom'), self.$subtitle.height())
|
||||
//Ox.Log('Video', '?!?', self.$subtitle.css('bottom'), self.$subtitle.height())
|
||||
}
|
||||
|
||||
function sizechange() {
|
||||
|
|
@ -1907,7 +1907,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
}
|
||||
|
||||
function showControls() {
|
||||
//Ox.print('showControls');
|
||||
//Ox.Log('Video', 'showControls');
|
||||
clearTimeout(self.interfaceTimeout);
|
||||
if (!self.interfaceIsVisible) {
|
||||
self.interfaceIsVisible = true;
|
||||
|
|
@ -1997,7 +1997,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
function submitPositionInput() {
|
||||
self.$positionInput.hide();
|
||||
self.$position.html('').show();
|
||||
//Ox.print('###', parsePositionInput(self.$positionInput.options('value')))
|
||||
//Ox.Log('Video', '###', parsePositionInput(self.$positionInput.options('value')))
|
||||
setPosition(parsePositionInput(self.$positionInput.options('value')));
|
||||
if (self.playOnSubmit) {
|
||||
togglePaused();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue