Date Tags feature

This post serves primarily to document how multimedia support works on podricing. What it is, how it works and its source code.


Diaspora currently does not support multimedia posts, as in, you can only write text based posts and post images. Since its source code is free to study and modify, a script that allows the posting of audio and video was added to the pod's source.

We tried to mess with Diaspora*s source code as little as possible. Diaspora* processes metadata, for example to crop and to resize uploaded images. For podricing to be able to support multimedia files upload we’d have to change these functions. Diaspora* devs have shown concerns about implementing video support, hopefully allowing users to be able to upload audio and videos within the pod interface, but, for now, podricing users are able to embed .webm and .oggs following the image inline embed syntax.

The script itself is not an extension of the third party markdown parser library to support inline audio / video, its a workaround, a javascript code that gets loaded with the pod's web interface, listening to DOM changes and interactively parsing tags resulted from inline embeds in a clever way that makes the embedding certain file extensions work in different ways. We don't expect this script to be pushed to the official Diaspora* source code.

You can check here for live examples of audo and video embeds.


You're going to install an additional javascript file to the pod's assets and recompile the project. The file is going to be embedded to the rest of the code that is loaded with the web interface.

First you download the script to the pod's javascript assets directory, then you add a line to the main file including it:

wget -O app/assets/javascripts/html5Embed.js
echo "//= require html5Embed" >> app/asset/javascripts/main.js

Finally you just need to recompile the project assets and restart the server.


Once installed, any user can write a post, or reply to a post with a link to a .webm video or .ogg audio file and embed it pretty much like how you do it with images.


Check my awesome video!

![alt text](http://example/video.webm)

Source code

You can download the source code here.