Compare commits
8 commits
3eb6e3f432
...
ffeee38d7d
| Author | SHA1 | Date | |
|---|---|---|---|
| ffeee38d7d | |||
| 48a3043a79 | |||
| 9c9d3a8e2f | |||
| ae12acda2a | |||
| b017ba5ba1 | |||
| bd7aedb116 | |||
| cebfedfdd4 | |||
| 39229c99a3 |
7 changed files with 50 additions and 3 deletions
|
|
@ -618,6 +618,16 @@ Ox.URL = function(options) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isDate(str) {
|
||||||
|
var values = /^(-?\d+)-?(\d+)?-?(\d+)? ?(\d+)?:?(\d+)?:?(\d+)?\.?(\d+)?$/
|
||||||
|
.exec(str);
|
||||||
|
return Boolean(
|
||||||
|
values &&
|
||||||
|
parseInt(values[1]) <= 9999 &&
|
||||||
|
(!values[2] || parseInt(values[2]) <= 12) &&
|
||||||
|
(!values[3] || parseInt(values[3]) <= 31)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
function getSpanType(str, types) {
|
function getSpanType(str, types) {
|
||||||
Ox.Log('Core', 'getSpanType', str, types)
|
Ox.Log('Core', 'getSpanType', str, types)
|
||||||
|
|
@ -633,7 +643,7 @@ Ox.URL = function(options) {
|
||||||
: canBeLocation && length == 4 ? 'location'
|
: canBeLocation && length == 4 ? 'location'
|
||||||
// leaves us with [-]D[.D][,[-]D[.D]]
|
// leaves us with [-]D[.D][,[-]D[.D]]
|
||||||
: canBeDuration ? 'duration'
|
: canBeDuration ? 'duration'
|
||||||
: canBeDate && !/\./.test(str) && !/^\d{7}$/.test(str) && !/^\d{8}$/.test(str) ? 'date'
|
: canBeDate && isDate(str) ? 'date'
|
||||||
: canBeLocation && length == 2 ? 'location'
|
: canBeLocation && length == 2 ? 'location'
|
||||||
: canBeNumber && /^\d+$/.test(str) ? 'number'
|
: canBeNumber && /^\d+$/.test(str) ? 'number'
|
||||||
: canBeString && str.length ? 'string'
|
: canBeString && str.length ? 'string'
|
||||||
|
|
@ -799,7 +809,10 @@ Ox.URL = function(options) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseURL(str, callback) {
|
function parseURL(str, callback) {
|
||||||
|
// remove facebook spam
|
||||||
|
str = str.replace(/\?fbclid=[A-Za-z0-9_]+/, '')
|
||||||
// fixme: removing trailing slash makes it impossible to search for '/'
|
// fixme: removing trailing slash makes it impossible to search for '/'
|
||||||
|
|
||||||
var split = str.split('#'),
|
var split = str.split('#'),
|
||||||
parts = split.shift().replace(/(^\/|\/$)/g, '').split('/'),
|
parts = split.shift().replace(/(^\/|\/$)/g, '').split('/'),
|
||||||
state = split.length && split[0].length
|
state = split.length && split[0].length
|
||||||
|
|
|
||||||
|
|
@ -206,7 +206,7 @@ Ox.TableList = function(options, self) {
|
||||||
.addClass('OxHead')
|
.addClass('OxHead')
|
||||||
.css({
|
.css({
|
||||||
right: self.options.scrollbarVisible
|
right: self.options.scrollbarVisible
|
||||||
? Ox.UI.SCROLLBAR_SIZE + 'px' : 0
|
? Math.max(Ox.UI.SCROLLBAR_SIZE, 8) + 'px' : 0
|
||||||
})
|
})
|
||||||
.appendTo(that.$bar);
|
.appendTo(that.$bar);
|
||||||
that.$head.$content.addClass('OxTitles');
|
that.$head.$content.addClass('OxTitles');
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,9 @@ Ox.VideoAnnotationPanel = function(options, self) {
|
||||||
setPoint('in', self.options.position);
|
setPoint('in', self.options.position);
|
||||||
},
|
},
|
||||||
key_k: function togglePlaybackRate() {
|
key_k: function togglePlaybackRate() {
|
||||||
that.options({playbackRate: self.options.playbackRate == 1 ? 2 : 1});
|
that.options({
|
||||||
|
playbackRate: self.options.playbackRate == 1 ? 2 : self.options.playbackRate == 2 ? 0.5 : 1
|
||||||
|
});
|
||||||
},
|
},
|
||||||
key_l: toggleLoop,
|
key_l: toggleLoop,
|
||||||
key_left: function() {
|
key_left: function() {
|
||||||
|
|
|
||||||
|
|
@ -321,6 +321,11 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
key_g: function() {
|
key_g: function() {
|
||||||
goToNext('result', 1);
|
goToNext('result', 1);
|
||||||
},
|
},
|
||||||
|
key_k: function togglePlaybackRate() {
|
||||||
|
that.options({
|
||||||
|
playbackRate: self.options.playbackRate == 1 ? 2 : self.options.playbackRate == 2 ? 0.5 : 1
|
||||||
|
});
|
||||||
|
},
|
||||||
key_l: toggleLoop,
|
key_l: toggleLoop,
|
||||||
key_left: function() {
|
key_left: function() {
|
||||||
setPosition(self.options.position - self.secondsPerFrame);
|
setPosition(self.options.position - self.secondsPerFrame);
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ Ox.VideoPlayerPanel <f> VideoPlayerPanel Object
|
||||||
key_* <!> key_*
|
key_* <!> key_*
|
||||||
muted <!> muted
|
muted <!> muted
|
||||||
paused <!> paused
|
paused <!> paused
|
||||||
|
playbackRate: <n|1> playback rate
|
||||||
position <!> position
|
position <!> position
|
||||||
resizecalendar <!> resizecalendar
|
resizecalendar <!> resizecalendar
|
||||||
resolution <!> resolution
|
resolution <!> resolution
|
||||||
|
|
@ -62,6 +63,7 @@ Ox.VideoPlayerPanel = function(options, self) {
|
||||||
muted: false,
|
muted: false,
|
||||||
out: 0,
|
out: 0,
|
||||||
paused: true,
|
paused: true,
|
||||||
|
playbackRate: 1,
|
||||||
playInToOut: false,
|
playInToOut: false,
|
||||||
position: 0,
|
position: 0,
|
||||||
poster: '',
|
poster: '',
|
||||||
|
|
@ -106,6 +108,11 @@ Ox.VideoPlayerPanel = function(options, self) {
|
||||||
paused: function() {
|
paused: function() {
|
||||||
self.$video.options({paused: self.options.paused});
|
self.$video.options({paused: self.options.paused});
|
||||||
},
|
},
|
||||||
|
playbackRate: function() {
|
||||||
|
self.$video.options({
|
||||||
|
playbackRate: self.options.playbackRate
|
||||||
|
});
|
||||||
|
},
|
||||||
position: function() {
|
position: function() {
|
||||||
self.$video.options({position: self.options.position});
|
self.$video.options({position: self.options.position});
|
||||||
self.$timeline.options({position: self.options.position});
|
self.$timeline.options({position: self.options.position});
|
||||||
|
|
@ -167,6 +174,11 @@ Ox.VideoPlayerPanel = function(options, self) {
|
||||||
self.$annotationPanel.options({selected: ''});
|
self.$annotationPanel.options({selected: ''});
|
||||||
setPoint('in', self.options.position, false, true);
|
setPoint('in', self.options.position, false, true);
|
||||||
},
|
},
|
||||||
|
key_k: function togglePlaybackRate() {
|
||||||
|
that.options({
|
||||||
|
playbackRate: self.options.playbackRate == 1 ? 2 : self.options.playbackRate == 2 ? 0.5 : 1
|
||||||
|
});
|
||||||
|
},
|
||||||
key_l: toggleLoop,
|
key_l: toggleLoop,
|
||||||
key_left: function() {
|
key_left: function() {
|
||||||
movePositionBy(-1 / self.options.fps);
|
movePositionBy(-1 / self.options.fps);
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,11 @@ Ox.VideoTimelinePanel = function(options, self) {
|
||||||
key_equal: function() {
|
key_equal: function() {
|
||||||
self.$video.changeVolume(0.1);
|
self.$video.changeVolume(0.1);
|
||||||
},
|
},
|
||||||
|
key_k: function togglePlaybackRate() {
|
||||||
|
that.options({
|
||||||
|
playbackRate: self.options.playbackRate == 1 ? 2 : self.options.playbackRate == 2 ? 0.5 : 1
|
||||||
|
});
|
||||||
|
},
|
||||||
key_minus: function() {
|
key_minus: function() {
|
||||||
self.$video.changeVolume(-0.1);
|
self.$video.changeVolume(-0.1);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ Ox.VideoTimelinePlayer = function(options, self) {
|
||||||
muted: false,
|
muted: false,
|
||||||
out: 0,
|
out: 0,
|
||||||
paused: false,
|
paused: false,
|
||||||
|
playbackRate: 1,
|
||||||
position: 0,
|
position: 0,
|
||||||
showMilliseconds: false,
|
showMilliseconds: false,
|
||||||
smallTimelineURL: '',
|
smallTimelineURL: '',
|
||||||
|
|
@ -52,6 +53,9 @@ Ox.VideoTimelinePlayer = function(options, self) {
|
||||||
self.options.paused = !self.options.paused;
|
self.options.paused = !self.options.paused;
|
||||||
togglePaused();
|
togglePaused();
|
||||||
},
|
},
|
||||||
|
playbackRate: function() {
|
||||||
|
self.$video.options({playbackRate: self.options.playbackRate});
|
||||||
|
},
|
||||||
position: setPosition,
|
position: setPosition,
|
||||||
timeline: function() {
|
timeline: function() {
|
||||||
self.$menuButton.checkItem('timelines_' + self.options.timeline);
|
self.$menuButton.checkItem('timelines_' + self.options.timeline);
|
||||||
|
|
@ -195,6 +199,11 @@ Ox.VideoTimelinePlayer = function(options, self) {
|
||||||
key_enter: function() {
|
key_enter: function() {
|
||||||
scrollToPosition();
|
scrollToPosition();
|
||||||
},
|
},
|
||||||
|
key_k: function togglePlaybackRate() {
|
||||||
|
that.options({
|
||||||
|
playbackRate: self.options.playbackRate == 1 ? 2 : self.options.playbackRate == 2 ? 0.5 : 1
|
||||||
|
});
|
||||||
|
},
|
||||||
key_left: function() {
|
key_left: function() {
|
||||||
self.options.position -= self.videoWidth / self.fps;
|
self.options.position -= self.videoWidth / self.fps;
|
||||||
setPosition();
|
setPosition();
|
||||||
|
|
@ -393,6 +402,7 @@ Ox.VideoTimelinePlayer = function(options, self) {
|
||||||
height: self.tileHeight,
|
height: self.tileHeight,
|
||||||
muted: self.options.muted,
|
muted: self.options.muted,
|
||||||
paused: self.options.paused,
|
paused: self.options.paused,
|
||||||
|
playbackRate: self.options.playbackRate,
|
||||||
position: self.options.position,
|
position: self.options.position,
|
||||||
scaleToFill: true,
|
scaleToFill: true,
|
||||||
video: self.options.video,
|
video: self.options.video,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue