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

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ed013f2d-8fcf-4a82-b7ef-0276daf917fdo%40googlegroups.com.

Reply via email to