Playing Sounds?

163 views
Skip to first unread message

Game Dungeon

unread,
Oct 19, 2020, 2:12:59 PM10/19/20
to TiddlyWiki
I want to play a short little ding every time I check something off my to-do list. Any way to do that in ~TiddlyWiki?  

TW Tones

unread,
Oct 19, 2020, 10:01:10 PM10/19/20
to TiddlyWiki
Hi,

This HTML works is the done.mp3 is in the same location as a tiddlywiki html file

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


Perhaps placing this in an alert that closes after sufficient time.



Regards
Tony

Game Dungeon

unread,
Oct 19, 2020, 10:14:11 PM10/19/20
to TiddlyWiki
How would play this on the check though?

Eric Shulman

unread,
Oct 20, 2020, 12:08:01 AM10/20/20
to TiddlyWiki
On Monday, October 19, 2020 at 7:14:11 PM UTC-7, Game Dungeon wrote:

I want to play a short little ding every time I check something off my to-do list. Any way to do that in ~TiddlyWiki?  

Try this:

1) Create a tiddler "DoneSound", containing:
<audio autoplay controls style="height:2em;width:10em;" >
  <source src="done.mp3" type="audio/mpeg">
</audio>

2) In your <$checkbox> widget, add a "checkactions" parameter, like this:
<$checkbox ... checkactions="""<$action-sendmessage $message="tm-notify" $param="DoneSound" />""">
   checkbox text goes here
</$checkbox>


1) The audio element uses "autoplay" and "controls", with a style attribute to make the display of the controls more compact than the default appearance.
2) The $checkbox widget uses checkactions="..." to send a "tm-notify" message to display the DoneSound contents in the upper right corner of the page.
3) Note that the notification message has a display duration of 3 seconds, so it will only play up to 3 seconds of sound before automatically going away.

enjoy,
-e

TW Tones

unread,
Oct 20, 2020, 2:00:41 AM10/20/20
to TiddlyWiki
Eric,

Thanks for filling in the gaps. Do you know how to import a sound file and address it in the audio tag?

Tones

Game Dungeon

unread,
Oct 20, 2020, 4:11:19 PM10/20/20
to TiddlyWiki
Tones,

With a little help from this (http://inmysocks.tiddlyspot.com/# ), I was able to figure it out. 

Game

Game Dungeon

unread,
Oct 20, 2020, 4:14:57 PM10/20/20
to TiddlyWiki
To be even more specific this:


(Ps. how do you edit a post on google groups?) 

Game Dungeon

unread,
Oct 20, 2020, 4:24:01 PM10/20/20
to TiddlyWiki
Also, can I create an invisible version of the notification message, that players the audio, but does not show the other tiddler?

TW Tones

unread,
Oct 20, 2020, 5:52:26 PM10/20/20
to TiddlyWiki
Game,


(Ps. how do you edit a post on google groups?) 


In the reply drop down of Classic Google Groups there is an edit option on only your own posts/replies that lets you edit.

Snag_50c7dee.png



However email subscribers only will not see this change, if important send an email {previous reply edited}

Tones
 

TW Tones

unread,
Oct 20, 2020, 5:53:35 PM10/20/20
to TiddlyWiki
Game,




There is still a gap, If you want to use HTML to play a tiddler {{audio-tiddler}} will not work.

Tones 

Game Dungeon

unread,
Oct 20, 2020, 6:30:33 PM10/20/20
to tiddl...@googlegroups.com
Tones,

I used what eric said in combo with that. My issue with editing was because I was using the new google groups. Wish tiddly wiki used discord or the reddit was more active.

Game

TW Tones

unread,
Oct 20, 2020, 6:33:54 PM10/20/20
to TiddlyWiki
I linked to the tiddlywiki 5 gamers discord in another thread to you !

Game Dungeon

unread,
Oct 20, 2020, 6:40:15 PM10/20/20
to TiddlyWiki
Your mixing me up with someone else there. Easy misunderstanding to make.

TW Tones

unread,
Oct 20, 2020, 6:48:42 PM10/20/20
to TiddlyWiki
Sry :)
Reply all
Reply to author
Forward
0 new messages