-
We had a serious problem in the office.
-
People would wander around aimlessly.
-
Wouldn't do any work.
-
They couldn't even dance!
-
We need music. I invented "play".
-
Play is like your company's DJ.
-
Lets everybody vote on songs, control your speakers,
-
and lets you figure out who keeps requesting Alanis Morrissette.
-
And you can do all of it through a cool API.
-
We tell Hubot what to play, and he usually plays it.
-
He's a dick sometimes, but he usually plays it.
-
Play is a webapp. To install it,
-
read the fuckin' README.
-
Honestly, people starting out screencasts with installing stuff is the most boring thing in the world.
-
Okay, so it's installed. When you're ready to go
-
say "play -w" and that will boot up your play instance for you.
-
This is play. Right on the frontpage is the queue,
-
these are songs people have requested play to play.
-
From here you can drill down into artists, albums -- whatever you want.
-
If you want to play a song you just click "play".
-
That gets queued up behind everything else.
-
Once all these play, your song plays. Very simple.
-
As you can see here there's also a download link,
-
so if you legally obtain this music and have
-
*full rights* to this music, you can download a copy straight from the browser to your machine.
-
Kind of rad.
-
There's also search, there's also profile links so there's some social going on.
-
Lots of social. And that's play.
-
The other part of play is the music server.
-
This actually plays your music.
-
To run that all you have to do is type "play -d" and it'll start the music.
-
[music plays]
-
So that's all cool, for those of you who are like:
-
"I like webpages and shiny buttons!"
-
But the rest of us, that's why we built an API.
-
That's how we built play into Hubot.
-
So this is Campfire. Campfire is how we talk to our bot Hubot, who know how to
-
integrate with play quite well.
-
First you just tell him "Hubot, I am Holman",
-
which in this case is true (I hope) and this basically tells him what your username on
-
GitHub is, because that's how we handle the authentication in play,
-
we just use OAuth to connect to Github and it's really easy.
-
Next you can say "Hubot, unpause play." Actually just "unpause".
-
And that will unpause the music.
-
At that point you can ask it what's playing,
-
and it will dutifully respond to you with with poignant suggestions.
-
At that point you can say "Hubot play deadmau5".
-
Because I really want to play deadmau5.
-
This is then going to queue up a bunch of deadmau5 tracks.
-
If I want to say "Hey, I want deadmau5 right fuckin' now!"
-
"Hubot play next" -- it'll skip this song and play the next song.
-
You can also request specific albums, you can request specific artists,
-
and specific songs.
-
You can also say "Hubot I want this song" and it'll give you a link to download this song.
-
You can also say "Hubot I want this album" and it will give you a link
-
to download the zip of the album.
-
Naturally, do that if you have *full rights* to the songs,
-
etc etc.
-
Also fun stuff: "Hubot volume 3", and that will adjust
-
the volume from Campfire to your speakers.
-
You can also do other fun stuff and Hubot will be able to talk to you.
-
[Computer voice: "I like big butts and I cannot lie"]
-
So that's play -- that's play in Campfire with Hubot integration.
-
Now you probably expect to pay five, six, maybe seven thousand dollars a month for this,
-
but I'm giving it to you *for free*.
-
Jesus.
-
So enjoy play.
-
And let me know what you're playing, and don't use this to play shitty music.
-
Or I'll find you.