We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

New extension: File Field Audio Preview

Development and Programming

Derek Hogue's avatar
Derek Hogue
317 posts
16 years ago
Derek Hogue's avatar Derek Hogue

I’m developing a site for a recording studio at the moment, and using nGen File Field for uploading audio. I thought that being able to preview the audio dynamically would be handy.

File Field Audio Preview dynamically adds a tiny audio player to MP3 audio files selected via nGen File Field fields in the control panel. This compliments the built-in image previews offered by the fieldtype.

To install, upload the included files to your extensions folder, language folder, and lib folders respectively. Activate the extension, and enter the URL to your lib folder in its settings. That’s it.

This extension utilizes the excellent 1 Bit audio player by Mark Wheeler.

File Field Audio Preview has been tested on ExpressionEngine 1.6.8 with nGen File Field 0.9.10. IE 6 compatibility might be a little iffy (are you surprised?).

Download File Field Audio Preview from GitHub.

       
Sean C. Smith's avatar
Sean C. Smith
3,818 posts
16 years ago
Sean C. Smith's avatar Sean C. Smith

Very cool - tweeting this thread now.

       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
16 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team

Very nice Derek. This will come in useful for some of the smaller podcasts I setup for clients. Nice work 😊

       
Adam George's avatar
Adam George
283 posts
16 years ago
Adam George's avatar Adam George

This is awesome! Well done!

       
Sean C. Smith's avatar
Sean C. Smith
3,818 posts
16 years ago
Sean C. Smith's avatar Sean C. Smith

I will be using this this weekend as i start adding a podcast to my latest client site.

       
lincolnpixel's avatar
lincolnpixel
83 posts
16 years ago
lincolnpixel's avatar lincolnpixel

Excellent!

       
leemcalilly's avatar
leemcalilly
97 posts
16 years ago
leemcalilly's avatar leemcalilly

Maybe I missing something really dumb, but I can’t seem to get this to work. I’ve installed everything as directed in the readme.markdown.

I have a normal n gen file field set up and the file upload location correct. Should the extension just recognize that the n gen field is accepting mp3’s and create the audio preview? I can’t even seem to get the file on the server.

I am linking to my /lib/ file in the settings like this http://example.com/system/lib/

Not sure how this extension should work. Any help is much appreciated.

Thanks!

       
leemcalilly's avatar
leemcalilly
97 posts
16 years ago
leemcalilly's avatar leemcalilly

Also, I’m able to upload an mp3 via ftp and then select it using “choose existing file”. Then it gives me the 1 bit audio player “play” icon in the control panel.

But when I hit “play” I just get the spinning circle and the file doesn’t seem to load.

Also, how does this extension work in your templates? Is there a way to use the one bit file player from the lib folder or do you need to install it in your template separately?

       
Derek Hogue's avatar
Derek Hogue
317 posts
16 years ago
Derek Hogue's avatar Derek Hogue

If you’re getting the play icon, that means it’s installed correctly - though I would recommend using a relative path to your lib folder (like /system/lib/).

If you can’t upload, that’s an issue with nGen File Field - maybe the file is too large, or you have your upload destination prefs set incorrectly. Ditto with not being able to play the file (spinning icon) - bad upload prefs I’d think. If you check your browser error messages you should be able to see what’s wrong (using Firebug for Firefox for instance, or looking in Safari’s Activity Window.

This extension is not made for your site’s front-end - I’d suggest installing it separately (though you can include the 1bit.js file from your lib folder if you like i suppose).

       
leemcalilly's avatar
leemcalilly
97 posts
16 years ago
leemcalilly's avatar leemcalilly

Thanks. I believe this is a problem with my server set up and the php memory limit. You helped me trouble shoot it though.

       
Douglas Reed's avatar
Douglas Reed
27 posts
16 years ago
Douglas Reed's avatar Douglas Reed

Hi. I’ve noticed that when using your extension in MSM, it only works when logging into the admin of a particular site from that site using admin.php, i.e. http://site1.com/admin.php.

If I log in from the “main” site, the URL is rewritten to main site’s location.

I.E., instead of seeing http://site1.com/audiofiles/audio.mp3 for the audio playback, I get http://mainsite.com/audiofiles/audio.mp3.

Any thoughts? Thanks!

       
Derek Hogue's avatar
Derek Hogue
317 posts
16 years ago
Derek Hogue's avatar Derek Hogue

Hmm, strange. Are nGen File Field image thumbnails working properly?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.