Fireship · @fireship
JavaScript Picks a T-Shirt Winner w/ Sound
Uploaded September 25, 2018 · Length 10:47
Summary
Using JavaScript to pick a winner from YouTube comments using the YouTube API.
- javascript
- youtube api
- comment picker
- live stream
- giveaway
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:03
hey what's up everybody can you hear me
- 0:06
okay
- 0:07
hey what's up everybody can you hear me
- 0:10
okay if so let me know in the comments
- 0:20
so yeah there's that a few second delay
- 0:22
on my end so yeah everything's good let
- 0:25
me know and then we'll get going
- 0:27
cool so yeah first of all we're about to
- 0:32
hit 50,000 subs so I just wanted to say
- 0:34
thank you to everybody for that it's
- 0:35
never really expected to get to that
- 0:37
point so yeah I just really appreciate
- 0:40
all the support and everything there and
- 0:43
then yeah I wanted to just kind of
- 0:45
experiment with these live streams I
- 0:47
think in the future we could do like
- 0:48
some ask me anything kind of videos and
- 0:51
stuff like that cool are you guys
- 0:55
getting an echo or do I sound okay cool
- 1:04
um alright so I think the first thing
- 1:07
I'll do is just will switch over to the
- 1:09
code what I'm going to do is pull all of
- 1:11
the comments from yesterday's video
- 1:13
using that YouTube API so it kind of
- 1:16
keeps with that same theme of using
- 1:17
Google API is to get something done so
- 1:20
if you haven't already commented on that
- 1:22
on yesterday's video you've got about
- 1:24
maybe two or three minutes to do that
- 1:26
and then we'll pull all the comments in
- 1:28
real time
- 1:28
so I'm gonna go ahead and switch over to
- 1:32
a screen share and then we'll just blow
- 1:35
through the code in a couple minutes and
- 1:36
then we'll pick the winner oops alright
- 1:45
and so this is the actual shirt that is
- 1:47
going to be going out it's a one of a
- 1:49
kind like for these giveaways I just
- 1:51
create a one-time design and it only
- 1:53
gets printed once so if you win you'll
- 1:55
be the only person in the world that has
- 1:57
to share it and then I'm gonna switch


