Saturday, July 11, 2009

Linking to an audio file

A request was made at an Inmagic Museum Users Group meeting about the ability to play an oral history audio file directly from a link in a database record.

This can be done by following the steps in the previous post, Linking to files from database record, and linking to a html file stored in the same folder as the audio files are stored. The html file would either contain information about a particular audio file including the code - a href="nameaudiofile.mp3" Play audio file followed by /a or contain a list of audio files with the code linking to the audio file for each item.

The link provided would look like Play audio file

An example page for a list of audio files might be

Ron Smith recounts memories of attending Smithville Primary School during the 1930s
Play audio file

Ellen Brown recounts her days as postmistress in Smithville
Play audio file

NB links in above section are not functional links

When the html page and the audio file are in the same folder or the path to the audio file is included if in a different folder, clicking on the link will start the playing of the audio file.

Example of sample code for html page

NB. The above will only work if
1. there is a built in media player on the computer and
2. there is an internet browser installed (there does not have to be an internet connection).

No comments: