CloudComments

From Music Hack Day

Revision as of 08:26, 1 August 2011 by Marcohamersma (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

[edit] CloudComments

An easily implementable system to add audio comments to any page similar to Disqus. Powered by SoundCloud.

[edit] Creator

Created by @marcohamersma.

[edit] About the hack

Audio is so much richer than text, so why not allow people to speak up on any page? By adding a small snippet of code to page or a template engine, a list of comments relating to the post/page is loaded. You can authenticate with your SoundCloud account and record a comment which then gets posted to the user's SoundCloud profile. The track links back to the original post in the title, description and machine tags.

[edit] Technology used

The comment form is loaded inside an iframe that links to the service with a the source url, title and optionally a color. When recording a new comment the source and title are added to the track by using machine tags. Originally I used SoundCloud's search API to find comments belonging to the url, but unfortunately the search index is not recent enough to do that that, so I used a local database storing the url, title, time and the SoundCloud track object in JSON. This gives me quick results but it also means that changes to the track and the user objects aren't reflected in the comments, neither are deletions.

For the recording and uploading I used recorder.js by Johannes Wagener's (who I have to thank deeply for his assistance while making this), the authentication is done by JavaScript. PHP handles the rendering of the page and database interaction.

If you have questions, don't be afraid to hit me up on twitter or "takes questions"!

[edit] Media

20110529-dwbuuqq4kixpdttdktqc178r3c.png

The video of the demo can be watched here

[edit] Source code and links

Available on Github.

Personal tools