diff --git a/Vocaluxe/Website/js/main.js b/Vocaluxe/Website/js/main.js index 39760925..8d7033da 100644 --- a/Vocaluxe/Website/js/main.js +++ b/Vocaluxe/Website/js/main.js @@ -8,18 +8,18 @@ var customSelectPlaylistSongCallback = null; var sessionId = ""; var serverBaseAddress = ""; -if (document.location.protocol == "file:") { - if(typeof (window.deviceAndJqmLoaded) == "undefined"){ - window.deviceAndJqmLoaded = $.Deferred(); - } - window.deviceAndJqmLoaded.done(function(){ - start(); - }) +if (document.location.protocol == "file:") { + if (typeof (window.deviceAndJqmLoaded) == "undefined") { + window.deviceAndJqmLoaded = $.Deferred(); + } + window.deviceAndJqmLoaded.done(function () { + start(); + }); } else { - $(document).ready(function () { - start(); - }); -} + $(document).ready(function () { + start(); + }); +} function start() { @@ -173,29 +173,30 @@ function initPageLoadHandler() { } if (document.location.protocol == "file:" - && typeof(navigator) != 'undefined' - && typeof(navigator.camera) != 'undefined' - && typeof(navigator.camera.getPicture) != 'undefined') { + && typeof (navigator) != 'undefined' + && typeof (navigator.camera) != 'undefined' + && typeof (navigator.camera.getPicture) != 'undefined') { navigator.camera.getPicture(function (imageData) { $('#playerAvatar').prop("src", "data:image/jpeg;base64," + imageData); $('#playerAvatar').data("changed", true); - }, function() { + }, function () { //Fail - do nothing }, { destinationType: navigator.camera.DestinationType.DATA_URL, allowEdit: true, correctOrientation: true, - saveToPhotoAlbum: true + saveToPhotoAlbum: true, + quality: 50 }); } else { $(document.body).append('