Skip to content

Commit

Permalink
Version 1.1 Launch
Browse files Browse the repository at this point in the history
On this launch the max number of results is increased to 50. That means now new searches will get back 50 results from the YouTube API. However it is important to note that it is not neccessary that 50 video will render on each time, because search results contains other types than videos, which are filtered out in this app, hence the video results depends on the search.
A new functionality also has been added to the app such that whenever a thumbnail or title is clicked, the window scrolls back to top.
  • Loading branch information
yunusparvezkhan committed Apr 12, 2023
1 parent 2c8ae5c commit 3d830d2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion devnotes.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
### Version 1
On this launch the app contains a search bar, very much like pics-fetching-app (https://github.com/yunusparvezkhan.pics-fetching-app). When user submits a search request, the app requests videos from youtube video api v3 and maps them on the screen. When any video title/thumbnail is clicked, a new section emerges from top containing a youtube video player, the video title, channel name, video description. Folks can use this app on their local environment to avoid ads, as CORS policy blocks the ads.
On this launch the app contains a search bar, very much like pics-fetching-app (https://github.com/yunusparvezkhan.pics-fetching-app). When user submits a search request, the app requests videos from youtube video api v3 and maps them on the screen. When any video title/thumbnail is clicked, a new section emerges from top containing a youtube video player, the video title, channel name, video description. Folks can use this app on their local environment to avoid ads, as CORS policy blocks the ads.

## Version 1.1
On this launch the max number of results is increased to 50. That means now new searches will get back 50 results from the YouTube API. However it is important to note that it is not neccessary that 50 video will render on each time, because search results contains other types than videos, which are filtered out in this app, hence the video results depends on the search.
A new functionality also has been added to the app such that whenever a thumbnail or title is clicked, the window scrolls back to top.
3 changes: 3 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ export default class App extends Component {

onVideoSelect = (video) => {
this.setState({ selectedVideo: video })
window.scrollTo(0, 0)
}



render() {
return (
<div className='container ui'>
Expand Down
2 changes: 1 addition & 1 deletion src/api/youtube-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default axios.create({
baseURL: "https://www.googleapis.com/youtube/v3",
params: {
part: "snippet",
maxResults: 5,
maxResults: 50,
key: KEY
}
})

0 comments on commit 3d830d2

Please sign in to comment.