Play audio file on 1st Page

Hi,

I downloaded the latest empty version of a TiddlyWiki and imported successfully a mp3 file named Welcome.mp3. I can play the fie and everything works fine so far.

I want to play the Welcome.mp3 sound on startup so I changed the GettingStartet Tiddler as follows:

created: 20240703214101000
modified: 20240703214234883
title: GettingStarted

<audio src=Welcome.mp3 autoplay/>


Hello World

saved the changes an the TiddlyWiki.
If I start the Wiki in the browser the sound will not be played :sleepy: .

But if I close the GettingStarted Tiddler and call it again the audio will be played as expected.

Is there a special setting necessary to hear also the audio directly after loaded to the browser?

Stefan

1 Like

I’m having a similar issue trying to get music to autoplay on startup. I haven’t found a solution yet after several hours…

Try making a startup actions tiddler, tagged $:/tags/StartupAction

You may need to add a delay with timeout tool by @EricShulman . See this thread: Startup behaviour using $:/status/UserName? - #2 by EricShulman

I have a demo here, but it’s only sometimes working… perhaps because background processes mess up the timing. I’m still troubleshooting it. But it may or may not give you at least a start…

This is what I tried too, but didn’t have any success, including tagging it with the different StartupAction variants (like $:/tags/StartupAction/PostRender) and combining it with the action-timeout widget, or making arbitrary edits to tiddlers on startup through action widgets to try and trigger it that way - no dice… I’m intrigued that it works some of the time for you, though, because it hasn’t been working at all for me.

Autoplay is blocked by the browser - in firefox you can turn it on:

https://support.mozilla.org/en-US/kb/block-autoplay#w_always-allow-or-block-media-autoplay

1 Like

That fixed it, thank you!!