It has been over five years since I released the last version of TagCanvas. That's mainly because I didn't have anything useful to do with it - I had a few suggestions from users that were either very unlikely to be useful to anyone else, or were somewhere between impractical and impossible to implement.
I wonder how you're feeling
That changed recently when someone suggested making the tags emit a sound when the mouse hovers over them. That sounded like a really good idea to me. I don't think anyone has asked for it before, and if they have then I'm sorry it has taken me this long to get around to it. (Though there are things on my to-do lists for other projects that have been hanging around for longer.)
So that's what this version is all about. The example below uses a few .ogg files from the Motion Monkey Free Retro Arcade Sounds Pack to demonstrate the two ways that TagCanvas 2.10 supports playing sounds.
The “Ding #1” sounds are played because of the
option, which is set to "/audio/Bell1.ogg". The
option gives TagCanvas a file to play for each tag, or you can set it to
false to completely disable audio.
The “Ding #2” and “Ding #3” sounds are played because
<a> elements contain
elements. It looks something like this:
<div id=dingtags> <a href=#>Ding #2<audio src="/audio/Bell5.ogg"></audio></a> <a href=#>Ding #1</a> <a href=#>Ding #1</a> <a href=#>Ding #1</a> <a href=#>Ding #1</a> <a href=#>Ding #3<audio src="/audio/Bell4.ogg"></audio></a> </div>
These audio files will play for the relevant tags whether
activeAudio is set or not. Setting
false will prevent them playing though.
There's ringing in my ears
If the audio stuff is working in your browser you should see a “mute” icon in the bottom right corner of the canvas. This is actually a button you can use to toggle audio playing, and it also shows the initial playing state. The initial playing state is normally that audio is enabled, unless the browser decides it should not be. This is because modern browsers don't let sites autoplay audio or video when you first visit them - once you start navigating around a site or clicking on things, then the browser will enable autoplay for that site. Or at least those are the current rules, I suspect they will change in the future.
Along with the
activeAudio option there are some more options for
controlling the sound volume and the appearance of the mute icon. You can find
them listed in the table of options on the TagCanvas
options page, all starting with “audio”.
Show me the way
Browsers have changed a fair amount in the time since version 2.9 of TagCanvas, so I could probably clean the code up a bit without causing any issues. I still welcome suggestions for updates (except when they seem to bend the laws of physics) and of course I'll fix any bugs that show up - so I don't think 2.10 is going to be the final version.
The new version of TagCanvas is available from the TagCanvas page.
“Frampton Comes Alive!” is available from all good record stores.