function getTitle(videoId) {
	    var _this2 = this;

	    var url = format(this.config.urls.youtube.api, videoId);
	    fetch(url).then(function (data) {
	      if (is$1.object(data)) {
	        var title = data.title,
	            height = data.height,
	            width = data.width; // Set title

	        _this2.config.title = title;
	        ui.setTitle.call(_this2); // Set aspect ratio

	        _this2.embed.ratio = [width, height];
	      }

	      setAspectRatio.call(_this2);
	    }).catch(function () {
	      // Set aspect ratio
	      setAspectRatio.call(_this2);
	    });
	  }
function getTitle(videoId) {
	    var _this2 = this;

	    var url = format(this.config.urls.youtube.api, videoId);
	    fetch(url).then(function (data) {
	      if (is$1.object(data)) {
	        var title = data.title,
	            height = data.height,
	            width = data.width; 

	        _this2.config.title = title;
	        ui.setTitle.call(_this2); 

	        _this2.embed.ratio = [width, height];
	      }

	      setAspectRatio.call(_this2);
	    }).catch(function () {
	      
	      setAspectRatio.call(_this2);
	    });
	  }
function getTitle ( videoId ) { var _this2 = this ; var url = format ( this . config . urls . youtube . api , videoId ) ; fetch ( url ) . then ( function ( data ) { if ( is$1 . object ( data ) ) { var title = data . title , height = data . height , width = data . width ; // Set title _this2 . config . title = title ; ui . setTitle . call ( _this2 ) ; // Set aspect ratio _this2 . embed . ratio = [ width , height ] ; } setAspectRatio . call ( _this2 ) ; } ) . catch ( function ( ) { // Set aspect ratio setAspectRatio . call ( _this2 ) ; } ) ; }
Get the media title
Get the media title