Audio button

This forum is for general questions about extensions for Joomla! 3.x.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
edform
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Wed May 09, 2007 8:07 pm

Audio button

Post by edform » Fri Dec 01, 2017 11:25 am

I have 365 articles, each consisting of a page of text with a date as the article name. Each day the correct article is selected and displayed as part of my homepage. I want to place a simple button next to the title of each text page that opens a pop-up audio player and plays a corresponding mp3 audio file. Among the vast array of audio player modules and plugins I cannot find one that does this - they all seem to have automatic playlist generation or other complications. All I want is a module that can place a play-button next to the page title, so that clicking the button embedded in my page for November 03 runs a single instruction to play November-03.mp3 and so on for each day.

Anyone have a suggestion for the right module/plugin? Free or paid is not an issue nor is the task of having to write 365 instructions.

Ed Form

User avatar
mjparadac
Joomla! Hero
Joomla! Hero
Posts: 2488
Joined: Mon Oct 29, 2012 3:58 pm

Re: Audio button

Post by mjparadac » Fri Dec 01, 2017 5:05 pm

Hello Ed,

AllVideos allows to play mp3 files.
https://extensions.joomla.org/extension/allvideos/

Hope this helps.

Regards,
Joomla Community Ambassador for A2 Hosting | A2 Hosting - Our speed, your success | https://www.a2hosting.com/joomla-hosting

User avatar
fcoulter
Joomla! Ace
Joomla! Ace
Posts: 1685
Joined: Thu Sep 13, 2007 11:39 am
Location: UK
Contact:

Re: Audio button

Post by fcoulter » Fri Dec 01, 2017 7:58 pm

Do you need an extension for this? Just place a link to the mp3 file, if the user clicks the link their web browser will know how to play the file. In your example the html for the link would be

Code: Select all

<a href="mp3s/November-03.mp3">Play</a>
If you want to open it in a new tab use target="_blank" as for any link.
http://www.spiralscripts.co.uk for Joomla! extensions
http://www.fionacoulter.com/blog my personal website
Security Forum moderator :: VEL team member
"Wearing my tin foil hat with pride"

edform
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Wed May 09, 2007 8:07 pm

Re: Audio button

Post by edform » Sun Dec 03, 2017 11:10 pm

mjparadac wrote:Hello Ed,

AllVideos allows to play mp3 files.
https://extensions.joomla.org/extension/allvideos/

Hope this helps.

Regards,
Thanks for the reply. I'm familiar with allvideos and find it to be hopelessly and impossibly complicated to use. In addition, searching as hard as I could I never found the syntax for the <audio> version of the command set.

Regards

Ed Form
Last edited by edform on Sun Dec 03, 2017 11:29 pm, edited 1 time in total.

edform
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Wed May 09, 2007 8:07 pm

Re: Audio button

Post by edform » Sun Dec 03, 2017 11:28 pm

fcoulter wrote:Do you need an extension for this? Just place a link to the mp3 file, if the user clicks the link their web browser will know how to play the file. In your example the html for the link would be

Code: Select all

<a href="mp3s/November-03.mp3">Play</a>
If you want to open it in a new tab use target="_blank" as for any link.
The problem with that approach is I really want the audio to play in the page so that listeners can follow the text as it is read to them.

Plus, lots of the new browsers refuse to play mp3 files and I'd have to duplicate with both mp3 and ogg files - which is a big task.

Thanks for the reply. I'm still playing with it.

Regards

Ed Form

User avatar
fcoulter
Joomla! Ace
Joomla! Ace
Posts: 1685
Joined: Thu Sep 13, 2007 11:39 am
Location: UK
Contact:

Re: Audio button

Post by fcoulter » Mon Dec 04, 2017 11:43 am

Use the html 5 audio element? It is probably as simple as using a plugin, eg

Code: Select all

 <audio controls>
  <source src="horse.ogg" type="audio/ogg">
  <source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio> 

See https://www.w3schools.com/html/html5_audio.asp

It is not going to be supported by older browsers, but then if you wanted that then you would need some complicated solution using Flash.
http://www.spiralscripts.co.uk for Joomla! extensions
http://www.fionacoulter.com/blog my personal website
Security Forum moderator :: VEL team member
"Wearing my tin foil hat with pride"

User avatar
wwhite
Joomla! Explorer
Joomla! Explorer
Posts: 469
Joined: Wed Jul 30, 2008 4:40 am
Location: SC USA

Re: Audio button

Post by wwhite » Mon Dec 04, 2017 1:29 pm

allvideos
I played around with the 4.8 ver with j 3.8.1 and found that i had to create a directory
SiteRoot/images/audio
and put the audio file there
Then
use the tag like this {mp3}MP3FILENAMEWITHOUTEXTENSION{/mp3} (with no spaces)
to get it to work inside a Joomla Article.
Joomla - K2
Funeral Director - Every Day Above Ground is a Good Day!
Saying - This old world keeps spinning round, it a wonder tall trees aint laying down https://www.[youtube].com/watch?v=c_W9aaQ1Apo

edform
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Wed May 09, 2007 8:07 pm

Re: Audio button

Post by edform » Thu Jan 18, 2018 7:42 am

wwhite wrote:allvideos
I played around with the 4.8 ver with j 3.8.1 and found that i had to create a directory
SiteRoot/images/audio
and put the audio file there
Then
use the tag like this {mp3}MP3FILENAMEWITHOUTEXTENSION{/mp3} (with no spaces)
to get it to work inside a Joomla Article.
That was broadly the way I did it. I found a module called Simple MP3 Player with the syntax...

{mp3}http://Site-root/images/mp3/readings/ma ... tle}Listen to the first portion{end-mp3

It accepts comma separated lists of files and titles and produces a neat scrollable list with play controls, embedded in the page.

Thanks for all the help

Ed Form


Locked

Return to “Extensions for Joomla! 3.x”