Fireship · @fireship

JavaScript Picks a T-Shirt Winner w/ Sound

Uploaded September 25, 2018 · Length 10:47

JavaScript Picks a T-Shirt Winner w/ Sound

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.

  1. 0:03

    hey what's up everybody can you hear me

  2. 0:06

    okay

  3. 0:07

    hey what's up everybody can you hear me

  4. 0:10

    okay if so let me know in the comments

  5. 0:20

    so yeah there's that a few second delay

  6. 0:22

    on my end so yeah everything's good let

  7. 0:25

    me know and then we'll get going

  8. 0:27

    cool so yeah first of all we're about to

  9. 0:32

    hit 50,000 subs so I just wanted to say

  10. 0:34

    thank you to everybody for that it's

  11. 0:35

    never really expected to get to that

  12. 0:37

    point so yeah I just really appreciate

  13. 0:40

    all the support and everything there and

  14. 0:43

    then yeah I wanted to just kind of

  15. 0:45

    experiment with these live streams I

  16. 0:47

    think in the future we could do like

  17. 0:48

    some ask me anything kind of videos and

  18. 0:51

    stuff like that cool are you guys

  19. 0:55

    getting an echo or do I sound okay cool

  20. 1:04

    um alright so I think the first thing

  21. 1:07

    I'll do is just will switch over to the

  22. 1:09

    code what I'm going to do is pull all of

  23. 1:11

    the comments from yesterday's video

  24. 1:13

    using that YouTube API so it kind of

  25. 1:16

    keeps with that same theme of using

  26. 1:17

    Google API is to get something done so

  27. 1:20

    if you haven't already commented on that

  28. 1:22

    on yesterday's video you've got about

  29. 1:24

    maybe two or three minutes to do that

  30. 1:26

    and then we'll pull all the comments in

  31. 1:28

    real time

  32. 1:28

    so I'm gonna go ahead and switch over to

  33. 1:32

    a screen share and then we'll just blow

  34. 1:35

    through the code in a couple minutes and

  35. 1:36

    then we'll pick the winner oops alright

  36. 1:45

    and so this is the actual shirt that is

  37. 1:47

    going to be going out it's a one of a

  38. 1:49

    kind like for these giveaways I just

  39. 1:51

    create a one-time design and it only

  40. 1:53

    gets printed once so if you win you'll

  41. 1:55

    be the only person in the world that has

  42. 1:57

    to share it and then I'm gonna switch