Including Audio Files in Generated Albums

There are two ways to include audio files:

  • As an independent file
  • To accompany an index or slide image page—the audio file will play when the corresponding index or slide image page is opened

Independent (standalone) audio files

Independent audio files are processed in the same manner as image files; a thumbnail is created and the audio file will play when the thumbnail is clicked. In order to have independedt audio files processed by JAlbum, the “ignore pattern” on the JAlbum Advanced-General tab must be edited so that it does not contain the extension for the type of audio file to be processed as an independet audio file (e.g., if the file to be processed as an independent audio file is a .wav file, then ‘wav’ must be delete from the ignore pattern.

Audio files to accompany index or slide image pages

To have an audio file play when an index page is opened, a meta.properties file must be used.

There are two ways to have an audio file play when a slide image page is opened:

  • Use a meta.properties file to reference an audio file that is hidden from JAlbum processing (the audio file is processed only by BluPlusPlus)
  • Place the audio file alongside its corresponding image file in an image folder (the audio file is processed by both JAlbum and BluPlusPlus)

Use a meta.properties file

This method is particularly tidy; some prefer the second method because it is easy to see by looking in the album directory which image files have accompanying audio files. Note: the end user’s (the person viewing the album) browser determines whether a particular format of audio file will be able to be played.

Place the audio file alongside image files

If an audio file is placed alongside the image in the image folder and is given the same name as the image it accompanies (except for the extension, which is ‘.mp3’, ‘.wav’, or whatever extension is appropriate for the kind of audio file used), the audio file will start to play when the slide image page for the image is opened.

Making an audio file type ‘BPP-aware’

By default, BluPlusPlus will recognize the following audio file types: au, mid, mp3, rm, wav, voc, wma. BluPlusPlus will process any audio file type listed in the supported-audios.txt file. Simply edit that file and add the desired audio file type to the end of the list.

Making an audio file type ‘JAlbum-aware’

By default, JAlbum will recognize the following audio file types: mp3, ram, rm. JAlbum will process any audio file type listed in the filetypes.xml’ file (located in the JAlbum folder on a PC—see this FAQ to locate JAlbum files on a Mac). Simply edit that file and add the desired audio file type to the end of the list.

Note: If the audio file is refered to via a meta.properties file, the filetype does not need to be ‘JAlbum-aware’.

How to make sure an audio file is not processed by JAlbum as an ‘image’

Typically, audio files are designed to be played while a slide image or index page is being viewed. In this case, the audio file must be hidden from processing by JAlbum. See this FAQ for how to do this; the sample album shows an example of this.

Customizing the HTML code used to process audio files

By default, BluPlusPlus uses <embed></embed> tags for audio (and video) files. This method was chosen because it maximizes cross browser and cross platform compatibility. By using <embed></embed> tags, the responsibility for processing the audio file rests with the end user’s browser.

There are other methods of presenting audio files to browsers which provide the end user’s browser with more information that will help the browser determine how to play the audio file. Unfortunately, often by providing this additional information, some browser/platform combinations may not be able to play an audio file that would play fine using <embed></embed> tags.

If they wish, knowledgable users may change the HTML code BPP uses to present audio files to browsers. To do this, edit the audio-block.inc and/or the audio-hidden-block.inc file in the BluPlusPlus-->config folder.