<commit_before>(function(exports) {

  function Movie(width, height, source, snapshot, totalTime) {
    this.width     = width;
    this.height    = height;
    this.source    = source;
    this.snapshot  = snapshot;
    this.totalTime = totalTime;
  }

  Movie.prototype.start = function(onFrame, onFinish, setTime, setLoading, loop) {
    var timeIntervalId;

    var source = this.source;
    var controller = {};

    function onSourceFinish() {
      if (loop) {
        start();
      } else {
        clearInterval(timeIntervalId);
        onFinish();
      }
    }

    function start() {
      var ctrl = source.start(onFrame, onSourceFinish, setLoading);

      for (prop in ctrl) {
        controller[prop] = ctrl[prop];
      }<commit_msg>set time on finish to fill progress bar<commit_after>(function(exports) {

  function Movie(width, height, source, snapshot, totalTime) {
    this.width     = width;
    this.height    = height;
    this.source    = source;
    this.snapshot  = snapshot;
    this.totalTime = totalTime;
  }

  Movie.prototype.start = function(onFrame, onFinish, setTime, setLoading, loop) {
    var timeIntervalId;

    var source = this.source;
    var controller = {};

    function onSourceFinish() {
      if (loop) {
        start();
      } else {
        setTime(controller.time());
        clearInterval(timeIntervalId);
        onFinish();
      }
    }

    function start() {
      var ctrl = source.start(onFrame, onSourceFinish, setLoading);

      for (prop in ctrl) {
        controller[prop] = ctrl[prop];
      }
{'fraction_non_alphanumeric': 0.11508951406649616, 'fraction_numerical': 0.0, 'mean_word_length': 2.447136563876652, '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': '7619266', 'n_tokens_mistral': 473, 'n_tokens_neox': 453, 'n_words': 110}