remove unused code

This commit is contained in:
j 2016-02-29 14:52:48 +05:30
parent dddd39aaa6
commit ae682c431d
1 changed files with 4 additions and 34 deletions

View File

@ -1,10 +1,8 @@
//init globals
//var seekBar;
var textArea;
var Video;
var filePath = false;
var videoListener;
var seekBar;
var globalUser;
var videoPath = undefined;
var videoHash = undefined;
@ -158,7 +156,7 @@ Ox.load({
]) != -1) {
loadVideo(data.files[0]);
} 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') {
var html = Ox.tmpl("dialog_about", {});
@ -243,9 +241,9 @@ Ox.load({
//autosave every 1 minute.
window.autosaveInterval = setInterval(function() {
if (typeof(videoHash) !== 'undefined') {
saveTxt();
}
if (!Ox.isUndefined(videoHash)) {
saveTxt();
}
}, 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() {
saveTxt();
});