g('Copying text command was ' + msg);
  } catch (err) {
    log('Oops, unable to copy');
  }
  document.body.removeChild(textArea);
}

VideoPlayer = function(video, player, id, options) {
  this.options = options || {};
  this.video = video;
  this.player = player;
  this.id = id;
  this.onTimeUpdate = this.onTimeUpdate.bind(this)
  this.onProgress = this.onProgress.bind(this)
  this.update_player_controls = this.update_player_controls.bind(this)
  this.update_player_controls_loop = this.update_player_contr