Music on homepage

Home Forums ColorMag Pro Music on homepage

This topic contains 8 replies, has 2 voices, and was last updated by  Bishal Napit 7 months, 1 week ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1396733

    avenirba
    Participant

    Hello,

    I would like to add music on my homepage only but I can’t get it to work. I have tried to insert a script which is ok on my other blog. I tried either in the header or in the front page (I use compact player) with no success:

    <center><?php
    if(is_front_page()){
    echo “🎼 ♫ ♪ Musique on|off C’est ici >>>> “;
    echo do_shortcode(‘[sc_embed_player fileurl=”https://www.verberie-ma-ville.com/wp-content/uploads/festive-christmas.mp3″ autoplay=”true” loops=”true”]’);
    }
    ?></center>
    Could you help me please?
    Thank you

    #1396790

    Bishal Napit
    Moderator

    @avenirba

    That should work out. However, are you sure that the required plugin for it is installed and activated? If not then, can you once check and confirm the same? Thanks.

    #1396851

    avenirba
    Participant

    Hello,
    Yes I did check and I have the required plugin. I tried to insert the code in the header (did not work) and then in the front page but it did not work either. It seems that the autoplay parameters does not start at all.

    Thank you again for your help

    #1396853

    Bishal Napit
    Moderator

    @avenirba

    Can you provide us the plugin name used and is it working while using any other theme? Can you let us know on those? Thanks.

    #1396864

    avenirba
    Participant

    Hello,

    I tried with another theme and it is working perfectly. The plugin I use is “compact audio player”

    Thank you again fir your precious help

    #1396944

    Bishal Napit
    Moderator

    @avenirba

    We tested the below PHP code in our development environment and seems to be working fine. So, maybe you can check that once too?

    if ( is_front_page() ) {
    	echo do_shortcode( '[sc_embed_player fileurl="https://www.verberie-ma-ville.com/wp-content/uploads/festive-christmas.mp3" autoplay="true" loops="true"]' );
    }

    Thanks.

    #1397167

    avenirba
    Participant

    Hello,

    I have just tried the piece of code you gave me but the autoplay part does not work. I can see the pause button, I have to click on it twice to get the music start :'(

    Thank you

    #1397169

    avenirba
    Participant

    Hello,

    Well it seems Chrome is blocking autoplay with its new policy. Could you see it there is a possible workaround? It works with Firefox and Edge.

    https://developers.google.com/web/updates/2017/09/autoplay-policy-changes

    Thank you so much

    #1397215

    Bishal Napit
    Moderator

    @avenirba

    We tested that on Chroumium browser on Ubuntu and all seems to be fine. So, maybe update the browser or clear the browser cache and check once? And again if that does not work then, maybe consult once with the respective plugin developer? They might be able to assist you onto this better than we could. Thanks.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.