I'd like to use Audiofield for files other than just MP3's. Specifically, I'd like support for MIDI's. Are there any compatible players that play MIDI files? For that matter, are there any players that could play WAV (for short sound effects) or OGG files?

Also, and this part is more of a bug report, I find that when I have a file in an Audio field with no associated player that Drupal spits out a PHP error about an invalid callback. I might also like to allow ZIP files with multiple audio files, but won't do that if it will always cause PHP errors in the module.

CommentFileSizeAuthor
#4 audiofield_embed.patch1.15 KBmeustrus
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

meustrus’s picture

I think that a possible solution for both of my problems may be to provide a fallback with <embed width='100%' height='15' src='file.mid'></embed> tags. If necessary I can test this and write up a patch.

tamerzg’s picture

Status: Active » Fixed

Audiofield supports several flash players but all of them can play only mp3 files. However we have API that allows you to easily write up a code for additional players that could play midi files. Please check this documentation: http://drupal.org/node/973194

Regarding the players that can play WAV files there is Nanogong player. ZIP files are not supported now, if you want to write a patch I might add it.

meustrus’s picture

Status: Fixed » Postponed

I'm sorry, but that hardly fixes my problem. I'm going to work on a patch that would enable a fallback <embed> player in case no other player is configured for the media type. That at least should allow MIDI's to work as intended. As far as I can tell the only thing this method doesn't work for is streaming audio (though I think some platforms do support it), which is a non-issue for MIDI's.

meustrus’s picture

FileSize
1.15 KB

Attached patch which causes Audiofield to default to <embed> when no valid player is available. Does not add the default player to the players list or change the extensibility at all. Cleans up to some degree the audiofield_get_player function. Please consider this patch for inclusion.

tamerzg’s picture

Status: Postponed » Fixed

Patch is commited to beta8

meustrus’s picture

Some notes now that I've had a chance to test on Windows (before I only tested Firefox and Safari on Mac): In IE 7, it asks permission to use a Windows Media Player ActiveX control, and the top of it is cut off. I can't find any way to get the height to fit the player the OS picks. In Firefox, it uses a Quicktime plugin (because Quicktime is installed; still no idea what happens if it isn't), and it isn't cut off because the Windows Quicktime plugin has the same height (15px) as the Mac plugin.

So it's cross-platform-ish, but annoying in IE. I wouldn't want to change the height from 15px, because then there's a white background above and below the player and the color can't be changed with CSS. There has to be a height value specified because it seems the default height is 200px, which will always be too much for audio files (probably OK for video files).

But in any case, it's better than nothing since there aren't any Flash players that support MIDI. Thanks for including the patch.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.