<commit_before>/** The minplayer namespace. */
var minplayer = minplayer || {};

// Define the controller object.
minplayer.controller = minplayer.controller || {};

/**
 * Constructor for the minplayer.controller
 */
minplayer.controller["default"] = function(context, options) {

  // Derive from base controller
  minplayer.controller.base.call(this, context, options);
};

/** Derive from controller.base. */
minplayer.controller["default"].prototype = new minplayer.controller.base();
minplayer.controller["default"].prototype.constructor = minplayer.controller["default"];

/**
 * Return the display for this plugin.
 */<commit_msg>Added the show-then-hide functionality to the control bar on full screen.<commit_after>/** The minplayer namespace. */
var minplayer = minplayer || {};

// Define the controller object.
minplayer.controller = minplayer.controller || {};

/**
 * Constructor for the minplayer.controller
 */
minplayer.controller["default"] = function(context, options) {

  // The fade timer.
  this.timer = 0;

  // Derive from base controller
  minplayer.controller.base.call(this, context, options);
};

/** Derive from controller.base. */
minplayer.controller["default"].prototype = new minplayer.controller.base();
minplayer.controller["default"].prototype.constructor = minplayer.controller["default"];

/**
 * @see minplayer.plugin#construct
 */
minplayer.controller["default"].prototype.construct = function() {
  minplayer.controller.base.prototype.construct.call(this);
  minplayer.get.call(this, this.options.id, null, function(plugin) {
    plugin.bind('fullscreen', {obj:this}, function(event, full) {
      event.data.obj.onFullScreen(full);
    });
  });
}

/**
 * Trigger when we go into full screen.
 */
minplayer.controller["default"].prototype.onFullScreen = function(full) {
  if (full) {

    var _this = this;
    var showThenHide = function() {
      clearTimeout(_this.timer);
      _this.display.show();
      _this.timer = setTimeout(function () {
        _this.display.hide('fast');
      }, 5000);
    };

    // Bind when they move the mouse.
    jQuery(document).bind('mousemove', showThenHide);
    showThenHide();
  }
  else {

    // Unbind the show then hide function.
    this.display.show();
    clearTimeout(this.timer);
    jQuery(document).unbind('mousemove', showThenHide);
  }
};

/**
 * Return the display for this plugin.
 */
{'fraction_non_alphanumeric': 0.1507537688442211, 'fraction_numerical': 0.0020938023450586263, 'mean_word_length': 3.9564315352697097, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1558253', 'n_tokens_mistral': 680, 'n_tokens_neox': 669, 'n_words': 154}