From ae682c431d96c5b6a552d2cc5474ec036c9101f5 Mon Sep 17 00:00:00 2001 From: j Date: Mon, 29 Feb 2016 14:52:48 +0530 Subject: [PATCH] remove unused code --- js/app.js | 38 ++++---------------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/js/app.js b/js/app.js index d481b54..9a8cf24 100644 --- a/js/app.js +++ b/js/app.js @@ -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(); });