Enter Your Email Address to Watch This Lesson

Your link to unlock this lesson will be sent to this email address.

Unlock this lesson and all 833 of the free egghead.io lessons, plus get Tools content delivered directly to your inbox!



Existing egghead members will not see this. Sign in.

Just one more step!

Check your inbox for an email from us and click link to unlock your lesson.



Capture video and audio in “bite-sized” chunks

3:33 Tools lesson by and

You aren’t the “1-take dizzle”. Instead of trying to get an entire lesson captured in a single capture, consider capturing audio and video in chunks. With our without a script, capturing in chunks makes it easy to redo parts and stay on-topic. You might see a repeating pattern of typing a bit of code > stop and explain as needed > typing a bit of code > repeat.


egghead.io comment guidelines

Avatar
egghead.io

You aren’t the “1-take dizzle”. Instead of trying to get an entire lesson captured in a single capture, consider capturing audio and video in chunks. With our without a script, capturing in chunks makes it easy to redo parts and stay on-topic. You might see a repeating pattern of typing a bit of code > stop and explain as needed > typing a bit of code > repeat.

Recording becomes easier when we record in bite-size chunks. It can be helpful to record with large pauses, so we can think about what we're going to say for the next chunk. This also helps splice together the good pieces when we start editing.

We can record audio and video separately or at the same time. Let's view an example.

First, let's type const URL and we'll set that equal to a string template. First, let's type const URL and let's set that equal to the GitHub API, so that's API.GitHub.com/users. Then we need some sort of user here that we can pass to this path.

Let's type const user equals some GitHub user name, which, if we use mine, that's Trevor D. Miller. Now we can use the global fetch function by saying fetch and then passing it our URL.

This function will return a promise, so we can say .then. When this promise resolves, it will contain our response. We'll say response and inside of this function, we can say response.JSON to convert our response into JSON.

Now we can say .then, and we can use our JSON response. Let's type .then. We'll have our JSON data, so we can do something with that. Let's console log out the type of the GitHub account.

We see we have the type of user, because the Trevor D. Miller GitHub account is of type user. If we go back up to our user string here and use Facebook, and we look at our browser, we now see that Facebook is of type organization.

Let's go down and type .catch. This will be used if we get an error, so we will get our error, and we can use that error, so let's just log out the error in this case.

Let's check that in our browser. Right now we're not getting an error. Let me turn off my network connection.

Now we get this type error failed to fetch.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?