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/player.js?2"></script>
|
||||||
<script type="text/javascript" src="js/staticfuncs.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/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/ox.extra.js"></script>
|
||||||
<script type="text/javascript" src="js/dnd.js"></script>
|
<script type="text/javascript" src="js/dnd.js"></script>
|
||||||
<script type="text/javascript" src="js/error.js?2"></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="filepath"></div>
|
||||||
<div id="timeCode">0:00:00.000</div>
|
<div id="timeCode">0:00:00.000</div>
|
||||||
<div id="helpWrapper">
|
<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>Esc</b>: Pause / Unpause <br />
|
||||||
<b>Insert / Tab</b>: Insert time-code<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 />
|
<b>Double-click on time-code in textarea</b>: Seek video to time-code. <br />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
51
js/app.js
51
js/app.js
|
@ -10,6 +10,11 @@ var videoHash = undefined;
|
||||||
Ox.load({
|
Ox.load({
|
||||||
UI: {theme: 'oxlight'},
|
UI: {theme: 'oxlight'},
|
||||||
}, function() {
|
}, function() {
|
||||||
|
if (navigator.platform == 'MacIntel') {
|
||||||
|
} else {
|
||||||
|
$('#seek_back').html('PageUp')
|
||||||
|
$('#seek_fwd').html('PageDown')
|
||||||
|
}
|
||||||
Ox.$body.show();
|
Ox.$body.show();
|
||||||
globalUser = new User();
|
globalUser = new User();
|
||||||
adjustSize();
|
adjustSize();
|
||||||
|
@ -40,19 +45,25 @@ Ox.load({
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Ctrl - Seek Back
|
if (navigator.platform == 'MacIntel') {
|
||||||
if (e.keyCode == 17) {
|
//Ctrl - Seek Back
|
||||||
var seekTime = parseFloat($('#seekTime').val());
|
if (e.keyCode == 17) {
|
||||||
var currTime = Video.get();
|
seek(-seekTime)
|
||||||
var newTime = currTime - seekTime;
|
}
|
||||||
Video.set(newTime);
|
//Alt - Seek Fwd.
|
||||||
}
|
if (e.keyCode == 18) {
|
||||||
//Alt - Seek Fwd.
|
seek(seekTime)
|
||||||
if (e.keyCode == 18) {
|
}
|
||||||
var seekTime = parseFloat($('#seekTime').val());
|
} else {
|
||||||
var currTime = Video.get();
|
//PageUp - seek back
|
||||||
var newTime = currTime + seekTime;
|
if (e.keyCode == 33) {
|
||||||
Video.set(newTime);
|
seek(-seekTime)
|
||||||
|
}
|
||||||
|
|
||||||
|
// PageDown - seek fwd.
|
||||||
|
if (e.keyCode == 34) {
|
||||||
|
seek(seekTime)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Space - togglePause if no focus on TA
|
//Space - togglePause if no focus on TA
|
||||||
|
@ -60,13 +71,14 @@ Ox.load({
|
||||||
Video.togglePause();
|
Video.togglePause();
|
||||||
}
|
}
|
||||||
|
|
||||||
//PageUp - volume Up:
|
//Shift PageUp - volume up:
|
||||||
if (e.keyCode == 33) {
|
if (e.keyCode == 33 && e.shiftKey) {
|
||||||
Video.volUp();
|
Video.volUp();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.keyCode == 34) {
|
//Shift PageDown - volume down:
|
||||||
|
if (e.keyCode == 34 && e.shiftKey) {
|
||||||
Video.volDown();
|
Video.volDown();
|
||||||
return false;
|
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() {
|
$(window).unload(function() {
|
||||||
saveTxt();
|
saveTxt();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue