Jump to content

How to add an audio player in a CMS page ?


kerlin

Recommended Posts

Hello,

I already posted in french forum but as I didn't received yet any reply, I try with english forum. So, sorry for my bad english.

I need to add an audio player in one CMS page (an icon, if we click on it the music plays)

I followed tuto of Majory Cubizolles and an other (http://www.tiger-222.fr/?d=2016/02/07/12/47/06-prestashop-comment-inserer-un-fichier-mp3) but after to have added the mp3 into the CMS page and saved it, the code is erased. Allowed iframe yes. HTML purifier NO.

How can I do that ?

PS 1.6

Thanks

Link to comment
Share on other sites

Bonjour,

html5 permet l'ajout de fichiers audio et vidéo très simplement :

<audio controls="controls">
<source src="chanson.ogg" type="audio/ogg" />
<source src="chanson.mp3" type="audio/mp3" />
Votre navigateur ne supporte pas la balise AUDIO.
</audio>

Je ne sais pas si cela répond à ta question.

Link to comment
Share on other sites

Merci pour ta réponse. Pour la balise, pas de souci, je la connais. Le problème venait de la page CMS qui ne l'enregistrait pas. J'ai alors en plus modifié des fichiers de tiny_mce, et après vidage du cache du serveur, ça fonctionne (mais peut-être que cela aurait fonctionné si ce cache avait été vidé avant la modif de tiny_mce, je n'ai pas la main dessus).

Maintenant, j'aimerais savoir si il est possible de personnaliser cela en suivant ce tuto https://www.cefim.eu/balise-html5-audio-comment-lutiliser-personnaliser/ car je n'ai besoin que du bouton marche/arrêt. Est-ce que Prestashop et le sytème CMS autoriserait cela ?

As we are on the english forum :

thanks for your reply. For this meta no problem, I know it. The issue was about the impossibility for the CMS to save this meta. So I found how to modify any files for tiny_mce. After to have empty cache server it works !! Perhaps it would works before this change if this cache was cleaned before, I don't have the control on it.

 

Now, I need to know if it's possible to customize the reader following this tuto https://www.cefim.eu/balise-html5-audio-comment-lutiliser-personnaliser/ because I need only Play/Stop button. Is it allowed by Prestashop and its CMS system ?

 

Thanks a lot !

Link to comment
Share on other sites

  • 5 years later...

Hello,

If you're looking to integrate an audio player into your PrestaShop CMS page, you might consider using the HTML5 <audio> tag for a straightforward solution. Here's a basic example:

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

Ensure that the audio file is accessible and properly linked. If you're facing issues with the CMS not saving the code, it might be related to the TinyMCE editor's settings. Some users have resolved this by modifying TinyMCE's configuration files and clearing the server cache. You can refer to this discussion for more details: PrestaShop Forum - How to add an audio player in a CMS page?

Additionally, if you're interested in exploring music streaming solutions, you might find Black Hole Music APK worth checking out. It's an open-source music player that offers high-quality, ad-free streaming and offline playback. You can learn more about it here: Black Hole Music APK

Best regards,

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...