Transcript
00:00 As part of my workshops, I've got this workshop app right here and we use Mux for hosting the videos so that users can watch the video right in line and then we can come down here with the instructions, follow the instructions to build out whatever we're doing for the exercise for the app.
00:17 And I had one of the learners ask if it was possible for me to put the length of this video somewhere in the UI so that they don't have to actually click on the video to get the length of the video right there. And I am not very familiar with the Mux API and so I went right over to ChatGPT and I asked it the question,
00:36 "I'm using Mux for video hosting. How do I get the length of the Mux video with the Mux playback ID?"
00:48 And this ChatGPT now, with its wealth of knowledge around the internet, can go and tell me, "Oh, okay. To get the length of this, you're going to need to get an access token, fetch the video details
01:02 with this endpoint, and then extract that video duration from that response. And here's an example." And so this really very quickly gets me pointed in the right direction. Now, I'm not just going to build the whole thing out right here. Now I have the right direction to go.
01:20 I know that it's most likely possible. I know the API that I need to hit. And I could actually start playing around with this if I wanted to in my editor and seeing if this is actually going to work. I personally don't really like NodeFetch. Fetch is now built into Node, so I can skip that. Not a big deal.
01:37 And I can see, "Okay, so this is how the authorization is set up." All of that stuff is handled for me just by asking that simple question. So I find myself doing this a lot. Anytime you feel like, "Oh, I'll just Google for that." Why don't you chat GPT at first, or use your AI assistant first?
01:57 And sometimes the AI assistant is going to say, "Oh, well, I actually don't know that knowledge cutoff date," or whatever. But often it's going to give you some really useful information that you can then go on and take further with whatever it is that you want to do.
02:11 Now, in my case, I actually can't use my token secret because this app is running locally on people's machines, and so I need to have some sort of proxy. If I wanted to use a secret, so I said, "Hey, is there any way I can avoid that?"
02:27 So I could say, "I don't want to use a mux secret. Is it possible to avoid that?" And I even have a misspelling, and chat GPT is not going to have a problem with that.
02:42 But yeah, so chat GPT is going to say, "Oh, that's not going to work for security reasons or whatever else." Which is actually, like, super helpful. So now I know, okay, so I have a pretty good idea of the constraints that I'm operating under, and of course you want to verify some stuff like this with actual documentation, maybe things have changed or whatever.
03:01 But it just helps you shape your understanding of the problem space, so you can go out and start actually implementing this stuff. And it also gives a couple other alternative ideas as well, which can be helpful.
03:14 So, that is exploring a space that you're a lot less familiar with.