remove unused code
This commit is contained in:
parent
dddd39aaa6
commit
ae682c431d
1 changed files with 4 additions and 34 deletions
34
js/app.js
34
js/app.js
|
@ -1,10 +1,8 @@
|
||||||
//init globals
|
//init globals
|
||||||
//var seekBar;
|
|
||||||
var textArea;
|
var textArea;
|
||||||
var Video;
|
var Video;
|
||||||
var filePath = false;
|
var filePath = false;
|
||||||
var videoListener;
|
var videoListener;
|
||||||
var seekBar;
|
|
||||||
var globalUser;
|
var globalUser;
|
||||||
var videoPath = undefined;
|
var videoPath = undefined;
|
||||||
var videoHash = undefined;
|
var videoHash = undefined;
|
||||||
|
@ -158,7 +156,7 @@ Ox.load({
|
||||||
]) != -1) {
|
]) != -1) {
|
||||||
loadVideo(data.files[0]);
|
loadVideo(data.files[0]);
|
||||||
} else {
|
} else {
|
||||||
alert('can only open video formats supported by browser');
|
alert('You can only open videos in formats supported by the browser.');
|
||||||
}
|
}
|
||||||
} else if(data.id == 'about') {
|
} else if(data.id == 'about') {
|
||||||
var html = Ox.tmpl("dialog_about", {});
|
var html = Ox.tmpl("dialog_about", {});
|
||||||
|
@ -243,7 +241,7 @@ Ox.load({
|
||||||
|
|
||||||
//autosave every 1 minute.
|
//autosave every 1 minute.
|
||||||
window.autosaveInterval = setInterval(function() {
|
window.autosaveInterval = setInterval(function() {
|
||||||
if (typeof(videoHash) !== 'undefined') {
|
if (!Ox.isUndefined(videoHash)) {
|
||||||
saveTxt();
|
saveTxt();
|
||||||
}
|
}
|
||||||
}, 60000);
|
}, 60000);
|
||||||
|
@ -318,34 +316,6 @@ function loadVideo(videoFile) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Functions to generate preview while encoding: see http://firefogg.org/examples
|
|
||||||
*/
|
|
||||||
//intialize interval to update preview and add event liseners.
|
|
||||||
//any previous listeners and intervals are cleared
|
|
||||||
var previewI=null;
|
|
||||||
|
|
||||||
function seekToEnd() {
|
|
||||||
// console.log("seeking to end of video");
|
|
||||||
var v = document.getElementById('previewVideo');
|
|
||||||
v.currentTime = v.duration-0.4;
|
|
||||||
}
|
|
||||||
//callback function render frame into canvas after seeking
|
|
||||||
function getFrame() {
|
|
||||||
var v = document.getElementById('previewVideo');
|
|
||||||
var canvas = document.getElementById('previewCanvas');
|
|
||||||
canvas.width = 400;
|
|
||||||
canvas.height = canvas.width * v.videoHeight/v.videoWidth;
|
|
||||||
var ctx = canvas.getContext("2d");
|
|
||||||
ctx.drawImage(v, 0, 0, canvas.width, canvas.height);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
End Preview functions
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
$(window).unload(function() {
|
$(window).unload(function() {
|
||||||
saveTxt();
|
saveTxt();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue