videoSearch (term) {
 	// this is a function calling an object from the youtube api_key
	// this follows the jQuery "get function"
	// Sec.2 lec. 29 9. The whole of the following is grabbing the list of videos
	YTSearch({key: API_KEY, term: term}, (videos) => {
	  this.setState({ 
	  	// Sec.2 lec. 29 10. here we are passing them to this.state.videos and 
	  		videos: videos,
	  		// [0] is calling the first video to be ready for playing.
	  		selectedVideo: videos[0]
	  	}); // Sec. 2 lec. 21 1. no longer just showing the data in the console, 
	  							 // but to look for the specific info to render videos use
	  // this.setState({ videos: videos }); but it also renders within es6 by just calling the 
	  // parameter (videos) from "videos" within "this.setState({ videos });" or visa versa
	  // Sec.2 lec. 29 7. Now to pass over the null by \selectedVideo; null\, we are going back to the 
	  // long form.
	  // Sec.2 lec. 29 8. So now the first video within the array is called in the YTSearch
	  // instead of the videoDetails "this.state".
    }); 
 	}
// it pops up here where term is called in videoSearch from youtube.
it pops up here where term is called in videoSearch from youtube.
it pops up here where term is called in videoSearch from youtube .
videoSearch (term) {
	YTSearch({key: API_KEY, term: term}, (videos) => {
	  this.setState({ 
	  		videos: videos,
	  		selectedVideo: videos[0]
	  	}); 
    }); 
 	}
videoSearch ( term ) { YTSearch ( { key : API_KEY , term : term } , ( videos ) => { this . setState ( { videos : videos , selectedVideo : videos [ 0 ] } ) ; } ) ; }
it pops up here where term is called in videoSearch from youtube.
it pops up here where term is called in videoSearch from youtube .
// this is a function calling an object from the youtube api_key // this follows the jQuery "get function" // Sec.2 lec. 29 9. The whole of the following is grabbing the list of videos // Sec.2 lec. 29 10. here we are passing them to this.state.videos and  // [0] is calling the first video to be ready for playing. // Sec. 2 lec. 21 1. no longer just showing the data in the console,  // but to look for the specific info to render videos use // this.setState({ videos: videos }); but it also renders within es6 by just calling the  // parameter (videos) from "videos" within "this.setState({ videos });" or visa versa // Sec.2 lec. 29 7. Now to pass over the null by \selectedVideo; null\, we are going back to the  // long form. // Sec.2 lec. 29 8. So now the first video within the array is called in the YTSearch // instead of the videoDetails "this.state".