HTML5Audio

Summary: Play HTML5 Audio
Version: 20160205
Prerequisites: none
Status: obsolete - use APE - Automagical PmWiki Embed instead
Maintainer:
Users: +1 (View / Edit)
Downloads: HTML5Audio.phpΔ
Discussion: HTML5Audio-Talk

Questions answered by this recipe

  • How to play HTML5 Audio?
  • How to play ogg Audio?
  • How to play mp3 Audio?
  • How to play wav Audio?

This section is optional; use it to indicate the types of questions (if any) this recipe is intended to answer.

Description

Enter your recipe's description here. I consider this addon obsolete - use APE - Automagical PmWiki Embed instead.

This recipe makes it easy to add HTML5 Audio.

It will first try to play ogg, then oga, then mp3 then wav. If the browser does not support HTML5 Audio it will display "Your browser does not allow HTML5 audio.".

Actual filenames should end with lowercase "ogg" or ".oga" for ogg, ".mp3" for mpeg, and ".wav" for wave.

Example:

(:html5audio filename=lounge_music :)

Parameters

  • filename - first part of file - so if the file was lounge_music.ogg it would be "lounge_music"

Installing

Copy HTML5Audio.phpΔ to your cookbook directory

In your config.php enter:

include_once("cookbook/HTML5Audio.php");

or in your farmconfig.php enter:

include_once("$FarmD/cookbook/HTML5Audio.php");

This program sets the default directory to contain audio in "\uploads\".

To change the default directory set a variable in your config.php file like this:

   $HTML5AudioDir = 'http://yourdomain.org/hot/audio/';

Notes

Release notes

  • Version: 1.0 - Initial release
  • Version 20160205: add php5.5 support

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

See also

HTML5Video

Contributors

Comments

See discussion at HTML5Audio-Talk

User notes +1: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.