Hosting Audio

Here we look at strategies for hosting audio files in Fedwiki. This is a specific use-case for creating an Audio Archive rather than simply a hosting files in a more general media archive.

# Aims

The aim is to host all the audio on our own servers, and also on IPFS for decentralised access. However we want to make it easy for people to use mobile phones to upload audio from the apps of their choice.

In the short term this could be achieved by integrating with Dropbox or Google Drive which if it were possible to drag and drop a url onto a Transporter could achieve effective hosting, with a later converter moving these hosted files to our own storage.

Look like this hack could work with DropBox at least. In the end we want our own mobile app with sharing extensions.

# HTML 5 Audio

We can display an HTML5 audio player in wiki using the audio plugin (but not the HTML plugin).

This it does not seem to work using an HTML5 Audio tag (see this HTML in this paragraph item).

# Hosting audio files on DropBox

DropBox does not make it easy to host content for display in other web sites. I guess they don;t see this as part of their business model.

However it is possible in situations in which Dropbox shows a preview of the media type (such as mp3 audio).

However I've not figured out a way to obtain an HTTP GET uri for .mp4 audio content for instance. First you need to share the file, then scrape the HTML of the visual preview of the file to obtain the audio tag - dropbox.com

<audio src="https://dl-web.dropbox.com/get/Audio/Discovery.Future%20of%20Biodiversity.mp3?_subject_uid=373931789&amp;duc_id=dropbox_duc_id&amp;w=AABUkxx7RTzB8t94fNSnVaxg3ORZWOqJ_3IswHrwuLdyNQ" preload="auto"> </audio>

Using the src url you cna then display the audio in an audio plugin as below:

https://dl-web.dropbox.com/get/Audio/Discovery.Future%20of%20Biodiversity.mp3?_subject_uid=373931789&amp;duc_id=dropbox_duc_id&amp;w=AABUkxx7RTzB8t94fNSnVaxg3ORZWOqJ_3IswHrwuLdyNQ A basic test from Dropbox

You need to use the full strange url for the audio file, which you can obtain by scraping the html of the viewer.

It may be possible to use the Dropbox API to obtain this url which has the following form:

https://dl-web.dropbox.com/get/Audio/ Discovery.Future%20of%20Biodiversity.mp3 ?_subject_uid=373931789 &duc_id=dropbox_duc_id &w=AABUkxx7RTzB8t94fNSnVaxg3ORZWOqJ_3IswHrwuLdyNQ

Removing the trainling part of the url does not work in case you seek to try it:

https://dl-web.dropbox.com/get/Audio/Discovery.Future%20of%20Biodiversity.mp3 A broken test from Dropbox where we remover the "?_subject_uid=..." part.

# Hosting using Google Drive It seems this is even more problematic. It may be possible via Google Music as there are some audio tags in the interface, and may be api access?

Here are some links describing possible hacks: - webapps.stackexchange.com - play.google.com

<audio src="blob:https://play.google.com/57fa5133-4ca1-4807-86ac-6c241cd6485b"></audio>

Obtaining a workable url for hot-linking for an mp3 from drive also seems tricky - drive.google.com