In a previous post, I talked about how a projector failure at the 010DEV event resulted in the presentation using laptops, smartphones and tablets to display the slides. One of the problems here, as noted by speaker Trisha Gee, is that on every device the next slide must be manually selected.

A couple of weeks ago, I came up with the idea of FilthyHackFriday – the idea being that you take a problem, and code up a quick’n’dirty solution in 30 minutes as a proof of concept. For my first FHF project, I chose to address this problem and wrote DistPres. It lets you upload Powerpoint or PDF presentations and converts each slide to an image. When you view a presentation, AJAX polling checks for changes to the current slide index and updates the view accordingly. You can control the presentation using the left and right arrow keys, and reset it to the first slide using the R key.

The use-case for this as follows. You’re in an upstairs room in a bar, trying to give a presentation but the projector doesn’t want to join in. So, you fire up DistPres and upload your presentation. Everyone points their device to your web server, and selects the correct presentation. From that point on, every time you change a slide everyone else will get the new slide automatically within a second.

Here’s an example using a presentation I downloaded from Slideshare. Three browsers – Chrome, Firefox and an Android emulator – are viewing the same presentation. When I use the left/right arrow keys (or, technically, just the right arrow key in this video), the current slide is updated in each browser within a second.

DistPres example using Chome, Firefow and an Android emulator from Steve Chaloner on Vimeo.

– It’s quick and dirty, but it works.
– With some cleaning up it could actually be pretty handy.
– It’s written using Play 2
– Originally I wrote it using WebSockets, but that automatically excludes certain browers and devices. AJAX polling opens the field a bit more.

You can find the code on GitHub here, or download it directly from here.

3 thoughts on “Controlling distributed presentations

  1. Looks to me as being more than a quick’n’dirty solution in 30 minutes, that’s the danger of starting these FilthyHackFriday’s.

    In my previous company I used to have a “refactor friday” where I would clean up legacy code 🙂

  2. Refactor Friday is a great idea, and to combine the two would also work well! Week 1 – fast and dirty POC, week 2 – clean it up and make it maintainable.

    I should point out – this is not something I’m suggesting for anything other than personal experimentation!

  3. Cool! I just had to implement the exact same functionality for our current project and came up with nearly the same solution.
    What puzzled me: How to convert potentially complex M$ presentations to images without running into problems.
    You are using Apache POI, right? What are your experiences? Any loss of content?
    I finally decided to let the user convert their PPTX or whatever to PDF and then break the PDF into one PDF per page (which I hope can be done without loosing content), and then display the PDF in an inline frame.

Leave a Reply

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