Audio Player Autoplay

Hi, I’m completely new to Sparkle and have a basic question regarding the audio player. Can you set it to autoplay as a website opens. Great app by the way, very well designed for the new user. Cheers, Terry

Hi @TerryBradford, unfortunately all modern browsers prevent any media containing audio from autoplaying, there’s no workaround. Video can be fixed by muting audio, but clearly that’s not useful for audio.

Hi Duncan, thanks so much for your quick reply. I thought it may be something like that. I suppose it may be an option to add a video with a still image containing info about the audio track you want visitors to hear and set that to autoplay, that might work. Thanks again, I’m enjoying getting used to working with the app. Terry

Hi again Duncan, just tried the video approach but obviously same situation with the video running but the audio being switched off…no problem just have to go back to the drawing board. Thanks again Terry

It’s the audio element that prevents the video from autoplaying. If you use a muted video or one that doesn’t contain an audio track, autoplay is possible.

It should be noted that although browsers do not allow autoplay of audio by default, this behaviour can be overridden by users in their browser preferences. For those that do this, autoplay will work, but only if the autoplay attribute is set on the music or video. In sparkle, you can only set autoplay on video - not on audio tracks. To add an audio track to sparkle with autoplay enabled, you would have to add your audio as a piece of code rather than use the dedicated audio element provided in Sparkle. You would also be restricted to using a single audio track on a page - you can imagine the noise of multiple tracks all playing at once when the page opens.

So, autoplay of audio or video with a soundtrack is really only applicable if you know that the audience is likely to have changed their browser preferences to allow such behaviour. This is not something we can really know, so best to leave users to click a play button if they want to hear the content.

Hi francbrowne, thanks for your input. It’s very early days for me putting websites together so the very mention of “code” frightens the living daylights out of me. I totally get that some people may not have their browser set to autoplay audio and of course I have no way of knowing if they have or not …so perhaps, as you say, a click on the audio player is probably the best. Just one more question please. Is it possible to insert an audio jukebox with say 3 or 4 tracks with titles, e.g. amazing audio player. I’ve been using Freeway 7 for a while but it’s pretty unpredictable sometimes and to make sites responsive is a little hit and miss…so Sparkle seems to be just perfect for me. I am a professional music producer/writer so all the sites I have done in the past are based around the presentation of music/artistes etc. so you can probably understand why it’s important to me. Thanks again, Terry

@TerryBradford No real need to use third-party products such as amazing audio player (although they can be implemented into Sparkle if you want). Basically, you can create your own jukebox in Sparkle just by adding multiple audio elements to your page. You can then arrange them next to track title and information text boxes, and maybe include some cover art. Here is an example of how such an arrangement looks in Sparkle.

1 Like

Hi again, yes I’d tried something like this which works pretty well but I kept the players separated. Snapping them together looks graphically nicer so I’ll pursue this line of thinking and see what I can come up with. Thanks so much for your help I’m really grateful Cheers Terry