use page up/down to seek
This commit is contained in:
parent
af5b4b2cf3
commit
0e662dfac5
2 changed files with 38 additions and 19 deletions
|
@ -8,7 +8,7 @@
|
|||
<script type="text/javascript" src="js/player.js?2"></script>
|
||||
<script type="text/javascript" src="js/staticfuncs.js?2"></script>
|
||||
<script type="text/javascript" src="js/classes.js?2"></script>
|
||||
<script type="text/javascript" src="js/app.js?2"></script>
|
||||
<script type="text/javascript" src="js/app.js?3"></script>
|
||||
<script type="text/javascript" src="js/ox.extra.js"></script>
|
||||
<script type="text/javascript" src="js/dnd.js"></script>
|
||||
<script type="text/javascript" src="js/error.js?2"></script>
|
||||
|
@ -112,10 +112,10 @@ A web based transcribing and subtitling tool. It is used for transcribing videos
|
|||
<div id="filepath"></div>
|
||||
<div id="timeCode">0:00:00.000</div>
|
||||
<div id="helpWrapper">
|
||||
<b>Ctrl</b> / <b>Alt</b>: Seek back / forward <input id="seekTime" value="1" /> seconds.<br />
|
||||
<b id="seek_back">Ctrl</b> / <b id="seek_fwd">Alt</b>: Seek back / forward <input id="seekTime" value="1" /> seconds.<br />
|
||||
<b>Esc</b>: Pause / Unpause <br />
|
||||
<b>Insert / Tab</b>: Insert time-code<br />
|
||||
<b>PageUp</b> / <b>PageDown</b>: Volume Up / Down<br />
|
||||
<b>Shift PageUp</b> / <b>Shift PageDown</b>: Volume Up / Down<br />
|
||||
<b>Double-click on time-code in textarea</b>: Seek video to time-code. <br />
|
||||
</div>
|
||||
|
||||
|
|
51
js/app.js
51
js/app.js
|
@ -10,6 +10,11 @@ var videoHash = undefined;
|
|||
Ox.load({
|
||||
UI: {theme: 'oxlight'},
|
||||
}, function() {
|
||||
if (navigator.platform == 'MacIntel') {
|
||||
} else {
|
||||
$('#seek_back').html('PageUp')
|
||||
$('#seek_fwd').html('PageDown')
|
||||
}
|
||||
Ox.$body.show();
|
||||
globalUser = new User();
|
||||
adjustSize();
|
||||
|
@ -40,19 +45,25 @@ Ox.load({
|
|||
return false;
|
||||
}
|
||||
}
|
||||
//Ctrl - Seek Back
|
||||
if (e.keyCode == 17) {
|
||||
var seekTime = parseFloat($('#seekTime').val());
|
||||
var currTime = Video.get();
|
||||
var newTime = currTime - seekTime;
|
||||
Video.set(newTime);
|
||||
}
|
||||
//Alt - Seek Fwd.
|
||||
if (e.keyCode == 18) {
|
||||
var seekTime = parseFloat($('#seekTime').val());
|
||||
var currTime = Video.get();
|
||||
var newTime = currTime + seekTime;
|
||||
Video.set(newTime);
|
||||
if (navigator.platform == 'MacIntel') {
|
||||
//Ctrl - Seek Back
|
||||
if (e.keyCode == 17) {
|
||||
seek(-seekTime)
|
||||
}
|
||||
//Alt - Seek Fwd.
|
||||
if (e.keyCode == 18) {
|
||||
seek(seekTime)
|
||||
}
|
||||
} else {
|
||||
//PageUp - seek back
|
||||
if (e.keyCode == 33) {
|
||||
seek(-seekTime)
|
||||
}
|
||||
|
||||
// PageDown - seek fwd.
|
||||
if (e.keyCode == 34) {
|
||||
seek(seekTime)
|
||||
}
|
||||
}
|
||||
|
||||
//Space - togglePause if no focus on TA
|
||||
|
@ -60,13 +71,14 @@ Ox.load({
|
|||
Video.togglePause();
|
||||
}
|
||||
|
||||
//PageUp - volume Up:
|
||||
if (e.keyCode == 33) {
|
||||
//Shift PageUp - volume up:
|
||||
if (e.keyCode == 33 && e.shiftKey) {
|
||||
Video.volUp();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (e.keyCode == 34) {
|
||||
//Shift PageDown - volume down:
|
||||
if (e.keyCode == 34 && e.shiftKey) {
|
||||
Video.volDown();
|
||||
return false;
|
||||
}
|
||||
|
@ -318,6 +330,13 @@ function loadVideo(videoFile) {
|
|||
});
|
||||
};
|
||||
|
||||
function seek(delta) {
|
||||
var seekTime = parseFloat($('#seekTime').val());
|
||||
var currTime = Video.get();
|
||||
var newTime = currTime + delta;
|
||||
Video.set(newTime);
|
||||
}
|
||||
|
||||
$(window).unload(function() {
|
||||
saveTxt();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue