<commit_before>(function() {
  /**
   * @fileoverview YouTube Media Controller - Wrapper for YouTube Media API
   */

  /**
   * YouTube Media Controller - Wrapper for YouTube Media API
   * @param {videojs.Player|Object} player
   * @param {Object=} options
   * @param {Function=} ready
   * @constructor
   */
  videojs.Youtube = videojs.MediaTechController.extend({
    /** @constructor */
    init: function(player, options, ready){
      videojs.MediaTechController.call(this, player, options, ready);
      
      // No event is triggering this for YouTube
      this.features['progressEvents'] = false;
      this.features['timeupdateEvents'] = false;

      // Copy the JavaScript options if they exists
      if (typeof options['source'] != 'undefined') {
        for (var key in options['source']) {
          player.options()[key] = options['source'][key];
        }
      }

      this.userQuality = videojs.Youtube.convertQualityName(player.options()['quality']);

      // Save those for internal usage
      this.player_ = player;
      this.player_el_ = document.getElementById(player.id());
      this.player_el_.className += ' vjs-youtube';

      // Create the Quality button
      this.qualityButton = document.createElement('div');
      this.qualityButton.setAttribute('class', 'vjs-quality-button vjs-menu-button vjs-control');
      this.qualityButton.setAttribute('tabindex', 0);
      
      var qualityContent = document.createElement('div');
      this.qualityButton.appendChild(qualityContent);
      
      this.qualityTitle = document.createElement('span');
      qualityContent.appendChild(this.qualityTitle);
      
      if (player.options()['quality'] !== 'undefined') {
        setInnerText(this.qualityTitle, player.options()['quality'] || 'auto');
      }
      
      var qualityMenu = document.createElement('div');
      qualityMenu.setAttribute('class', 'vjs-menu');
      this.qualityButton.appendChild(qualityMenu);
      
      this.qualityMenuContent = document.createElement('ul');
      this.qualityMenuContent.setAttribute('class', 'vjs-menu-content');
      qualityMenu.appendChild(this.qualityMenuContent);

      this.id_ = this.player_.id() + '_youtube_api';

      this.el_ = videojs.Component.prototype.createEl('iframe', {
        id: this.id_,
        className: 'vjs-tech',
        scrolling: 'no',
        marginWidth: 0,
        marginHeight: 0,
        frameBorder: 0,
        webkitAllowFullScreen: 'true',
        mozallowfullscreen: 'true',
        allowFullScreen: 'true'
      });

      this.player_el_.insertBefore(this.el_, this.player_el_.firstChild);
      
      if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
        var ieVersion = new Number(RegExp.$1);
        
        // IE10 and under doesn't support pointer-events: none on non-SVG element
        if (ieVersion < 11) this.addIframeBlocker(ieVersion);
      } else if (!/(iPad|iPhone|iPod|android)/g.test(navigator.userAgent)) {
        // the pointer-events: none block the mobile player
        this.el_.className += ' onDesktop';
        this.addIframeBlocker();
      }

      this.parseSrc(player.options()['src']);

      this.playOnReady = this.player_.options()['autoplay'] || false;
      this.forceSSL = (typeof this.player_.options()['forceSSL'] === 'undefined' || this.player_.options()['forceSSL'] === true ? true : false);
      this.forceHTML5 = (typeof this.player_.options()['forceHTML5'] === 'undefined' || this.player_.options()['forceHTML5'] === true ? true : false);

      var params = {
        enablejsapi: 1,
        iv_load_policy: 3,
        playerapiid: this.id(),
        disablekb: 1,
        wmode: 'transparent',
        controls: (this.player_.options()['ytcontrols'])?1:0,
        html5: (this.player_.options()['forceHTML5'])?1:null,
        playsinline: (this.player_.options()['playsInline'])?1:0,
        showinfo: 0,<commit_msg>Fixed iframeblocker for IE<commit_after>(function() {
  /**
   * @fileoverview YouTube Media Controller - Wrapper for YouTube Media API
   */

  /**
   * YouTube Media Controller - Wrapper for YouTube Media API
   * @param {videojs.Player|Object} player
   * @param {Object=} options
   * @param {Function=} ready
   * @constructor
   */
  videojs.Youtube = videojs.MediaTechController.extend({
    /** @constructor */
    init: function(player, options, ready){
      videojs.MediaTechController.call(this, player, options, ready);
      
      // No event is triggering this for YouTube
      this.features['progressEvents'] = false;
      this.features['timeupdateEvents'] = false;

      // Copy the JavaScript options if they exists
      if (typeof options['source'] != 'undefined') {
        for (var key in options['source']) {
          player.options()[key] = options['source'][key];
        }
      }

      this.userQuality = videojs.Youtube.convertQualityName(player.options()['quality']);

      // Save those for internal usage
      this.player_ = player;
      this.player_el_ = document.getElementById(player.id());
      this.player_el_.className += ' vjs-youtube';

      // Create the Quality button
      this.qualityButton = document.createElement('div');
      this.qualityButton.setAttribute('class', 'vjs-quality-button vjs-menu-button vjs-control');
      this.qualityButton.setAttribute('tabindex', 0);
      
      var qualityContent = document.createElement('div');
      this.qualityButton.appendChild(qualityContent);
      
      this.qualityTitle = document.createElement('span');
      qualityContent.appendChild(this.qualityTitle);
      
      if (player.options()['quality'] !== 'undefined') {
        setInnerText(this.qualityTitle, player.options()['quality'] || 'auto');
      }
      
      var qualityMenu = document.createElement('div');
      qualityMenu.setAttribute('class', 'vjs-menu');
      this.qualityButton.appendChild(qualityMenu);
      
      this.qualityMenuContent = document.createElement('ul');
      this.qualityMenuContent.setAttribute('class', 'vjs-menu-content');
      qualityMenu.appendChild(this.qualityMenuContent);

      this.id_ = this.player_.id() + '_youtube_api';

      this.el_ = videojs.Component.prototype.createEl('iframe', {
        id: this.id_,
        className: 'vjs-tech',
        scrolling: 'no',
        marginWidth: 0,
        marginHeight: 0,
        frameBorder: 0,
        webkitAllowFullScreen: 'true',
        mozallowfullscreen: 'true',
        allowFullScreen: 'true'
      });

      this.player_el_.insertBefore(this.el_, this.player_el_.firstChild);
      
      if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
        var ieVersion = new Number(RegExp.$1);
        this.addIframeBlocker(ieVersion);
      } else if (!/(iPad|iPhone|iPod|android)/g.test(navigator.userAgent)) {
        // the pointer-events: none block the mobile player
        this.el_.className += ' onDesktop';
        this.addIframeBlocker();
      }

      this.parseSrc(player.options()['src']);

      this.playOnReady = this.player_.options()['autoplay'] || false;
      this.forceSSL = (typeof this.player_.options()['forceSSL'] === 'undefined' || this.player_.options()['forceSSL'] === true ? true : false);
      this.forceHTML5 = (typeof this.player_.options()['forceHTML5'] === 'undefined' || this.player_.options()['forceHTML5'] === true ? true : false);

      var params = {
        enablejsapi: 1,
        iv_load_policy: 3,
        playerapiid: this.id(),
        disablekb: 1,
        wmode: 'transparent',
        controls: (this.player_.options()['ytcontrols'])?1:0,
        html5: (this.player_.options()['forceHTML5'])?1:null,
        playsinline: (this.player_.options()['playsInline'])?1:0,
        showinfo: 0,
{'fraction_non_alphanumeric': 0.1469901401141671, 'fraction_numerical': 0.005448884276076803, 'mean_word_length': 2.953333333333333, 'pattern_counts': {'":': 0, '<': 4, '<?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': '3985557', 'n_tokens_mistral': 2238, 'n_tokens_neox': 2174, 'n_words': 421}