initialize() {
    if (window.YT) {
      this._onYouTubeIframeAPIReady(this._properties.videoID);
    } else {
      let script = document.createElement('script'),
        firstScript = document.getElementsByTagName('script')[0];

      window.onYouTubeIframeAPIReady = this._onYouTubeIframeAPIReady.bind(
        this,
        this._properties.videoID
      );

      script.src = 'https://www.youtube.com/iframe_api';
      firstScript.parentNode.insertBefore(script, firstScript);
    }
  }
/**
   * Downloads the YouTube script (if needed) and initializes the video API
   *
   * @returns {void}
   */
Downloads the YouTube script (if needed) and initializes the video API
@returns {void}
Downloads the YouTube script ( if needed ) and initializes the video API @returns { void }
initialize() {
    if (window.YT) {
      this._onYouTubeIframeAPIReady(this._properties.videoID);
    } else {
      let script = document.createElement('script'),
        firstScript = document.getElementsByTagName('script')[0];
      window.onYouTubeIframeAPIReady = this._onYouTubeIframeAPIReady.bind(
        this,
        this._properties.videoID
      );
      script.src = 'https://www.youtube.com/iframe_api';
      firstScript.parentNode.insertBefore(script, firstScript);
    }
  }
initialize ( ) { if ( window . YT ) { this . _onYouTubeIframeAPIReady ( this . _properties . videoID ) ; } else { let script = document . createElement ( 'script' ) , firstScript = document . getElementsByTagName ( 'script' ) [ 0 ] ; window . onYouTubeIframeAPIReady = this . _onYouTubeIframeAPIReady . bind ( this , this . _properties . videoID ) ; script . src = 'https://www.youtube.com/iframe_api' ; firstScript . parentNode . insertBefore ( script , firstScript ) ; } }
Downloads the YouTube script (if needed) and initializes the video API
 @returns {void}
Downloads the YouTube script ( if needed ) and initializes the video API @returns { void }