Okay
  Public Ticket #3152153
Auto play
Closed

Comments

  • Alex started the conversation

    I would like the player autoplay when i'm arrive on the website.

    Actually i can't make autoplay, if i play on the bottom player, it play music and if i change of page it continue so onloading the autoplay work when i change of page, but i would like the autoplay is when the viewer come on the website.

    How i can make this plz ?

  •  1,114
    Max replied

    Auto-play audio when your page loads is now banned by most desktop and mobile browsers including Chrome and Safari. This is what we call a "Auto-Play Policy". To play audio in a web browser, the user has to interact with the page before audio can play. Interactions is something like clicking a menu, a button, scroll down the page, etc.

    The closest thing you can do is to automatically fire the sticky footer player when the page load and then, users will have to click play. To do it, edit your page and select your playlist in the Music dropdown. See screenshot: https://d.pr/i/ouq7Ay

    You can read more about the Chrome browser policy here: https://www.theoplayer.com/blog/chrome-autoplay-policy-what-you-need-to-know

    Thanks,


    Max from the Sonaar.io Crew

  • Alex replied

    thanks for your response @max. I know those new policies but when i put this code 

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

    the autoplay work, i use the stiky on the bottom already, i just need it autostart like an audio control

  •  1,114
    Max replied

    It works for you because your give ykur browser settings permission to do it but, 99% of your visitor have not auto play enabled for your site.

    Auto play won't work 

    Thanks,


    Max from the Sonaar.io Crew

  • Alex replied

    ok. thanks for your response.

    other question the mp3 player play a radio stream.

    I have a link to get the title who is on air.

    https://api.radioking.io/widget/radio/radiostereochic/track/current?format=text

    Can i put regulary in the player the content of this so i have the title in the sticky bar?

  •  1,114
    Max replied

    Unfortunately this is not possible. Perhaps you can hire a web developer to implement this for you but at this time, we don't have this feature built in into the player. 

    Thanks,


    Max from the Sonaar.io Crew

  • Alex replied

    yeah i can customize it but can you just inform me of where is the template file of the sticky bar so i could modify it as i want

  •  1,114
    Max replied

    The sticky player is done with VueJS.

    The template is in file called sonaar-player.php and the js/components are in sonaarPlayer.js

    in the pro plugin.

    Thanks,


    Max from the Sonaar.io Crew

  • Alex replied

    Thanks for your response. I'll check that. The ticket can be close, all is ok for me