BYU Speeches player with history

Update 10/26/2012: The history functionality needs some work. I’ve tweaked it to only log a play if you listen for at least 30 seconds (to avoid accidentally logging something that you didn’t actually listen to), and it won’t log additional plays after the first play until you’ve switched to a new talk (so you don’t end up with 15 “you started…” records in a row for the same talk). I made the talk title and author name link to the appropriate pages so you can easily find what you want to listen to. I’ve also added some social sharing stuff (per Joey’s request) in case you really like a talk and want to send it to a friend.

Original post:

The BYU Speeches website provides over a thousand devotionals and firesides in MP3 format. The speakers include people you’ve never heard of, and a bunch of big name people, too (like apostles and prophets). I used to download the PDFs of the talks and read them, but I thought I’d give listening a try.

I stumbled on a player written by a friend of mine, Joey Novak, but the pretty looking version of it wasn’t working on my computer and it was missing a few features I wanted. Rather than bug him to change it I decided I’d just make my own. I got to work on it this morning and have a pretty functional player ready for use. There are a lot of features I’d like to implement, but I’m not going to go too crazy devoting tons of time to this until I get a chance to use it and see what would actually be useful.

The first step in building this was scraping the data. I wrote a small script that looped through all the content at BYU Speeches and scraped the author(s), speech title, date it was given, and the URL to the MP3. I shoved all of this into a database. Next I searched for a free MP3 player script, and found the same one that Joey was using. Turns out everyone uses jPlayer. It didn’t take long to get a basic working player up with a random playlist selected from my database. A great perk of using jPlayer is that it looks great on a mobile phone. I spent a few more minutes and added in the ability to pull up a playlist for a specific speaker.

Where I spent most of my time was working on a history system. I’ve added the ability to log in using a Google account, and then I’ll (confidentially) track what you listen to. This needs some work and I’m not satisfied with how it looks, but the basic functionality is there. It will let you know when you started listening to an item, finished listening to an item, and (bonus!) won’t select stuff you’ve already listened to when you pull up a random playlist. This is what I was really wanting because it drives me nuts to get 15 minutes into a talk only to realize I’ve already heard it. With about 1,400 talks at around 30 minutes each, I doubt I’ll ever run out of stuff to listen to.

I think I’ll eventually modify it to only log that you started listening to something once you’ve been listening for 60 seconds or so. This gives you time to decide if you want to listen to it or not without falsely thinking you’ve actually listened to it. I’m also planning on adding a “resume” function, so it will remember what you were listening to last and how far in you got, so it can automatically pick up where you left off when you pull the page up.

I also need to write an RSS parser so I can update my database whenever they announce new content. I don’t expect this will take long, I just haven’t gotten around to doing it yet.

Anyways, click here to check out my BYU Speeches player.

No comments

Trackbacks/Pingbacks

  1. A Better BYU Speech Player - [...] Better BYU Speech Player October 26th, 2012 by joey | Filed under Uncategorized. My friend Jacob…

Leave a Reply

Your email address will not be published. Required fields are marked *