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.
Enter your recipe's description here. 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.
(:html5audio filename=lounge_music :)
- filename - first part of file - so if the file was lounge_music.ogg it would be "lounge_music"
In your config.php enter:
or in your farmconfig.php enter:
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/';
This program is free software.
You can redistribute it and/or modify it under
the terms of the GNU General Public License as
published by the Free Software Foundation
http://www.fsf.org either version 2 of the
License, or (at your option) any later version.
Copyright 2007 by GNUZoo
Please email to arrange a donation to the author: guru [snail] gnuzoo [period] org
- 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 discussion at HTML5Audio-Talk