The idea behind this module is to allow HTML5 tags to be used anywhere, with cross-browser compatibility. It is a simple wrapper for the audio.js library.

Audio.js provides an automatic flash fallback which prevents you from having to worry about browsers that don't support HTML5 (i.e. older browsers) or lack support for MP3 playback (i.e. Firefox, at least as of now); this allows you to avoid writing extra code for cross-browser compatibility.

You must first download the audio.js library here: http://kolber.github.com/audiojs/
It's recommended that you extract this to to sites/all/libraries
Then, simply enter the path to the audio.js file on the module configuration page.

Once installed, use the standard HTML5 element anywhere on your site; browsers without native HTML5 / MP3 support will now automatically use flash to allow audio playback.

Future plans include a simple widget type for file fields which will automatically embed a basic audio element containing the file uploaded.

Project Page: http://drupal.org/sandbox/rbenhase/1674986
Git: rbenhase@git.drupal.org:sandbox/rbenhase/1674986.git

Comments

mantish’s picture

Status: Needs review » Needs work

Hi Rbenhase,

I did a manual review of your code and found a some of issues.

Remove LICENSE.txt as it will be added automatically.

Try not to exceed more than 80 characters per line.

Try not to use HTML Tags within t() function (html5_audio.module on line 31), check this .

I will update you about the automated review later as the site is down.

Regards
M

rbenhase’s picture

Status: Needs work » Needs review

Pushed some changes to get rid of HTML tags in t() function and otherwise clean up the code a bit. Also removed LICENSE.txt. Thanks for your help.

mantish’s picture

Status: Needs review » Needs work

Hey rbenhase,

I can confirm that you have corrected the usage of t() function.

I could make an automated review of your project, here is the link - http://ventral.org/pareview/httpgitdrupalorgsandboxrbenhase1674986git

Here are some tips :
- As i said before try to keep less than 80 characters on a line in any file.
- Never use ?> in any file of drupal module.
- Remove $Id from .info file.
- Check for indentations and whitespaces. There must be no whitespaces at the end of the line. Don't use tabs, use space.
- End the files with new line character (If using Linux, you can use "dos2unix" command to convert the file to linux format).
- Never work on master branch, create a branch 7.x-1.x and place all the code in that. The master branch must contain only
a README.txt that tells the developers about the correct branch to look for the code. The content can be found here.

After committing the changes you can always do a repeat review on ventral.org to check for errors.

Regards,
M

rbenhase’s picture

Status: Needs work » Needs review

Passes ventral.org automated review after last commit.

rbenhase’s picture

Still awaiting review...

patrickd’s picture

I'm sorry for the delay! There are about 100 other applications waiting for review and only a hand full of active reviewers.
We do really need more hands in the application queue and highly recommend to get a review bonus so we can come back to your application sooner.

jibus’s picture

Status: Needs review » Needs work

Hi !

I a did a manual review of your module. I am not an expert, below is what i found:

In your implementation of hook_help():
- The help path case 'admin/modules#description': seems incorrect, shoud be case 'admin/help#html5_audio':
- You should use return instead of $output. See http://api.drupal.org/api/drupal/modules!help!help.api.php/function/hook...
- In order to make your content translatable, you should use the t() function (without the html tag)
- Avoid css tag if possible

Very little suggestion: since the aim of the plugin used in this module is designed to make the audio player work in most broswers, i think you should precise in your readme file and in your project page which browser is supported.

I tested the module, it didn't work the first time.

I looked into your html5_audio_init.js, and i use Drupal Behavior (http://drupal.org/node/756722), then it worked:

(function ($) {

  Drupal.behaviors.html5_audio = {

    attach: function(context) {

    audiojs.events.ready(function() {
    var as = audiojs.createAll();
  });

   }

  };

  })(jQuery);

Hope that helps

Very cool module

Edit: one last thing, you could also check if the js plugin is present with hook_requirements() in your .install file

klausi’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.