Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#4 | audiofield_embed.patch | 1.15 KB | meustrus |
Comments
Comment #1
meustrus CreditAttribution: meustrus commentedI 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.Comment #2
tamerzg CreditAttribution: tamerzg commentedAudiofield 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.
Comment #3
meustrus CreditAttribution: meustrus commentedI'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.Comment #4
meustrus CreditAttribution: meustrus commentedAttached 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.Comment #5
tamerzg CreditAttribution: tamerzg commentedPatch is commited to beta8
Comment #6
meustrus CreditAttribution: meustrus commentedSome 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.