1 00:00:01,535 --> 00:00:03,670 We had a serious problem in the office. 2 00:00:03,670 --> 00:00:05,973 People would wander around aimlessly. 3 00:00:05,973 --> 00:00:07,608 Wouldn't do any work. 4 00:00:07,608 --> 00:00:10,210 They couldn't even dance! 5 00:00:10,210 --> 00:00:19,820 We need music. I invented "play". 6 00:00:19,820 --> 00:00:21,488 Play is like your company's DJ. 7 00:00:21,488 --> 00:00:23,824 Lets everybody vote on songs, control your speakers, 8 00:00:23,824 --> 00:00:27,227 and lets you figure out who keeps requesting Alanis Morrissette. 9 00:00:27,227 --> 00:00:29,025 And you can do all of it through a cool API. 10 00:00:29,025 --> 00:00:31,811 We tell Hubot what to play, and he usually plays it. 11 00:00:31,811 --> 00:00:35,002 He's a dick sometimes, but he usually plays it. 12 00:00:35,002 --> 00:00:36,670 Play is a webapp. To install it, 13 00:00:36,670 --> 00:00:38,801 read the fuckin' README. 14 00:00:38,801 --> 00:00:43,977 Honestly, people starting out screencasts with installing stuff is the most boring thing in the world. 15 00:00:43,977 --> 00:00:47,299 Okay, so it's installed. When you're ready to go 16 00:00:47,299 --> 00:00:52,407 say "play -w" and that will boot up your play instance for you. 17 00:00:52,407 --> 00:00:55,194 This is play. Right on the frontpage is the queue, 18 00:00:55,194 --> 00:00:58,592 these are songs people have requested play to play. 19 00:00:58,592 --> 00:01:02,362 From here you can drill down into artists, albums -- whatever you want. 20 00:01:02,362 --> 00:01:05,202 If you want to play a song you just click "play". 21 00:01:05,202 --> 00:01:08,335 That gets queued up behind everything else. 22 00:01:08,335 --> 00:01:12,771 Once all these play, your song plays. Very simple. 23 00:01:12,771 --> 00:01:15,309 As you can see here there's also a download link, 24 00:01:15,309 --> 00:01:19,212 so if you legally obtain this music and have 25 00:01:19,212 --> 00:01:25,287 *full rights* to this music, you can download a copy straight from the browser to your machine. 26 00:01:25,287 --> 00:01:26,820 Kind of rad. 27 00:01:26,820 --> 00:01:31,692 There's also search, there's also profile links so there's some social going on. 28 00:01:31,692 --> 00:01:36,096 Lots of social. And that's play. 29 00:01:36,096 --> 00:01:38,569 The other part of play is the music server. 30 00:01:38,569 --> 00:01:40,167 This actually plays your music. 31 00:01:40,167 --> 00:01:46,306 To run that all you have to do is type "play -d" and it'll start the music. 32 00:01:46,306 --> 00:01:59,286 [music plays] 33 00:01:59,286 --> 00:02:01,788 So that's all cool, for those of you who are like: 34 00:02:01,788 --> 00:02:05,086 "I like webpages and shiny buttons!" 35 00:02:05,086 --> 00:02:09,162 But the rest of us, that's why we built an API. 36 00:02:09,162 --> 00:02:12,470 That's how we built play into Hubot. 37 00:02:12,470 --> 00:02:15,936 So this is Campfire. Campfire is how we talk to our bot Hubot, who know how to 38 00:02:15,936 --> 00:02:19,473 integrate with play quite well. 39 00:02:19,473 --> 00:02:22,609 First you just tell him "Hubot, I am Holman", 40 00:02:22,609 --> 00:02:27,447 which in this case is true (I hope) and this basically tells him what your username on 41 00:02:27,447 --> 00:02:30,517 GitHub is, because that's how we handle the authentication in play, 42 00:02:30,517 --> 00:02:34,721 we just use OAuth to connect to Github and it's really easy. 43 00:02:34,721 --> 00:02:40,460 Next you can say "Hubot, unpause play." Actually just "unpause". 44 00:02:40,460 --> 00:02:44,798 And that will unpause the music. 45 00:02:44,798 --> 00:02:46,603 At that point you can ask it what's playing, 46 00:02:46,603 --> 00:02:50,737 and it will dutifully respond to you with with poignant suggestions. 47 00:02:50,737 --> 00:02:53,607 At that point you can say "Hubot play deadmau5". 48 00:02:53,607 --> 00:02:57,878 Because I really want to play deadmau5. 49 00:02:57,878 --> 00:03:01,248 This is then going to queue up a bunch of deadmau5 tracks. 50 00:03:01,248 --> 00:03:05,919 If I want to say "Hey, I want deadmau5 right fuckin' now!" 51 00:03:05,919 --> 00:03:12,626 "Hubot play next" -- it'll skip this song and play the next song. 52 00:03:12,626 --> 00:03:17,030 You can also request specific albums, you can request specific artists, 53 00:03:17,030 --> 00:03:19,633 and specific songs. 54 00:03:19,633 --> 00:03:25,152 You can also say "Hubot I want this song" and it'll give you a link to download this song. 55 00:03:25,152 --> 00:03:28,575 You can also say "Hubot I want this album" and it will give you a link 56 00:03:28,575 --> 00:03:31,464 to download the zip of the album. 57 00:03:31,464 --> 00:03:35,615 Naturally, do that if you have *full rights* to the songs, 58 00:03:35,615 --> 00:03:38,418 etc etc. 59 00:03:38,418 --> 00:03:43,690 Also fun stuff: "Hubot volume 3", and that will adjust 60 00:03:43,690 --> 00:03:49,463 the volume from Campfire to your speakers. 61 00:03:49,463 --> 00:04:02,709 You can also do other fun stuff and Hubot will be able to talk to you. 62 00:04:02,709 --> 00:04:06,613 [Computer voice: "I like big butts and I cannot lie"] 63 00:04:06,613 --> 00:04:12,085 So that's play -- that's play in Campfire with Hubot integration. 64 00:04:12,085 --> 00:04:18,444 Now you probably expect to pay five, six, maybe seven thousand dollars a month for this, 65 00:04:18,444 --> 00:04:23,268 but I'm giving it to you *for free*. 66 00:04:23,268 --> 00:04:25,565 Jesus. 67 00:04:25,565 --> 00:04:27,234 So enjoy play. 68 00:04:27,234 --> 00:04:32,272 And let me know what you're playing, and don't use this to play shitty music. 69 00:04:32,272 --> 99:59:59,999 Or I'll find you.