Exemple #1
0
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');
};
Exemple #2
0
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');
}
Exemple #3
0
 LazyL10n.get(function() {
   dcf.init();
   performanceTesting.dispatch('startup-path-done');
 });