App.prototype.miscStuff = function() { var camera = this.camera; var focusTimeout; var self = this; // TODO: Should probably be // moved to a focusRing controller camera.on('change:focus', function(value) { self.views.focusRing.setState(value); clearTimeout(focusTimeout); if (value === 'fail') { focusTimeout = setTimeout(function() { self.views.focusRing.setState(null); }, 1000); } }); dcf.init(); performanceTesting.dispatch('initialising-camera-preview'); // Prevent the phone // from going to sleep. lockscreen.disableTimeout(); debug('misc stuff done'); };
function Storage() { this.maxFileSize = 0; this.check = this.check.bind(this); this.onStorageChange = this.onStorageChange.bind(this); this.video = navigator.getDeviceStorage('videos'); this.image = navigator.getDeviceStorage('pictures'); this.image.addEventListener('change', this.onStorageChange); this.createVideoFilepath = this.createVideoFilepath.bind(this); dcf.init(); debug('initialized'); }
LazyL10n.get(function() { dcf.init(); performanceTesting.dispatch('startup-path-done'); });