WEBVTT 00:00:01.535 --> 00:00:03.670 We had a serious problem in the office. 00:00:03.670 --> 00:00:05.973 People would wander around aimlessly. 00:00:05.973 --> 00:00:07.608 Wouldn't do any work. 00:00:07.608 --> 00:00:10.210 They couldn't even dance! 00:00:10.210 --> 00:00:19.820 We need music. I invented "play". 00:00:19.820 --> 00:00:21.488 Play is like your company's DJ. 00:00:21.488 --> 00:00:23.824 Lets everybody vote on songs, control your speakers, 00:00:23.824 --> 00:00:27.227 and lets you figure out who keeps requesting Alanis Morrissette. 00:00:27.227 --> 00:00:29.025 And you can do all of it through a cool API. 00:00:29.025 --> 00:00:31.811 We tell Hubot what to play, and he usually plays it. 00:00:31.811 --> 00:00:35.002 He's a dick sometimes, but he usually plays it. 00:00:35.002 --> 00:00:36.670 Play is a webapp. To install it, 00:00:36.670 --> 00:00:38.801 read the fuckin' README. 00:00:38.801 --> 00:00:43.977 Honestly, people starting out screencasts with installing stuff is the most boring thing in the world. 00:00:43.977 --> 00:00:47.299 Okay, so it's installed. When you're ready to go 00:00:47.299 --> 00:00:52.407 say "play -w" and that will boot up your play instance for you. 00:00:52.407 --> 00:00:55.194 This is play. Right on the frontpage is the queue, 00:00:55.194 --> 00:00:58.592 these are songs people have requested play to play. 00:00:58.592 --> 00:01:02.362 From here you can drill down into artists, albums -- whatever you want. 00:01:02.362 --> 00:01:05.202 If you want to play a song you just click "play". 00:01:05.202 --> 00:01:08.335 That gets queued up behind everything else. 00:01:08.335 --> 00:01:12.771 Once all these play, your song plays. Very simple. 00:01:12.771 --> 00:01:15.309 As you can see here there's also a download link, 00:01:15.309 --> 00:01:19.212 so if you legally obtain this music and have 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. 00:01:25.287 --> 00:01:26.820 Kind of rad. 00:01:26.820 --> 00:01:31.692 There's also search, there's also profile links so there's some social going on. 00:01:31.692 --> 00:01:36.096 Lots of social. And that's play. 00:01:36.096 --> 00:01:38.569 The other part of play is the music server. 00:01:38.569 --> 00:01:40.167 This actually plays your music. 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. 00:01:46.306 --> 00:01:59.286 [music plays] 00:01:59.286 --> 00:02:01.788 So that's all cool, for those of you who are like: 00:02:01.788 --> 00:02:05.086 "I like webpages and shiny buttons!" 00:02:05.086 --> 00:02:09.162 But the rest of us, that's why we built an API. 00:02:09.162 --> 00:02:12.470 That's how we built play into Hubot. 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 00:02:15.936 --> 00:02:19.473 integrate with play quite well. 00:02:19.473 --> 00:02:22.609 First you just tell him "Hubot, I am Holman", 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 00:02:27.447 --> 00:02:30.517 GitHub is, because that's how we handle the authentication in play, 00:02:30.517 --> 00:02:34.721 we just use OAuth to connect to Github and it's really easy. 00:02:34.721 --> 00:02:40.460 Next you can say "Hubot, unpause play." Actually just "unpause". 00:02:40.460 --> 00:02:44.798 And that will unpause the music. 00:02:44.798 --> 00:02:46.603 At that point you can ask it what's playing, 00:02:46.603 --> 00:02:50.737 and it will dutifully respond to you with with poignant suggestions. 00:02:50.737 --> 00:02:53.607 At that point you can say "Hubot play deadmau5". 00:02:53.607 --> 00:02:57.878 Because I really want to play deadmau5. 00:02:57.878 --> 00:03:01.248 This is then going to queue up a bunch of deadmau5 tracks. 00:03:01.248 --> 00:03:05.919 If I want to say "Hey, I want deadmau5 right fuckin' now!" 00:03:05.919 --> 00:03:12.626 "Hubot play next" -- it'll skip this song and play the next song. 00:03:12.626 --> 00:03:17.030 You can also request specific albums, you can request specific artists, 00:03:17.030 --> 00:03:19.633 and specific songs. 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. 00:03:25.152 --> 00:03:28.575 You can also say "Hubot I want this album" and it will give you a link 00:03:28.575 --> 00:03:31.464 to download the zip of the album. 00:03:31.464 --> 00:03:35.615 Naturally, do that if you have *full rights* to the songs, 00:03:35.615 --> 00:03:38.418 etc etc. 00:03:38.418 --> 00:03:43.690 Also fun stuff: "Hubot volume 3", and that will adjust 00:03:43.690 --> 00:03:49.463 the volume from Campfire to your speakers. 00:03:49.463 --> 00:04:02.709 You can also do other fun stuff and Hubot will be able to talk to you. 00:04:02.709 --> 00:04:06.613 [Computer voice: "I like big butts and I cannot lie"] 00:04:06.613 --> 00:04:12.085 So that's play -- that's play in Campfire with Hubot integration. 00:04:12.085 --> 00:04:18.444 Now you probably expect to pay five, six, maybe seven thousand dollars a month for this, 00:04:18.444 --> 00:04:23.268 but I'm giving it to you *for free*. 00:04:23.268 --> 00:04:25.565 Jesus. 00:04:25.565 --> 00:04:27.234 So enjoy play. 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. 00:04:32.272 --> 99:59:59.999 Or I'll find you.