[Koha-devel] Koha Sound Events

Darrell Ulm darrellulm at smfpl.org
Thu Feb 4 16:50:31 CET 2010


Hello,

Working on putting sound events into Koha 3.2 but it is a bit of a pickle. 

While I have it working using <embed (embed is the problem, works to a point,
but please read below) ... <embed is not the solution for playing the sound

My question is *what is?*. Currently the two best candidates are playing with a
Java Applet (works very well and loads concurrently so no delay) or Flash, which
I have not tested. 

Basically to get decent sound, we are going to need a plug-in, because web
browsers just don't cut it for playing sound in a fast environment.

<!-- TMPL_IF NAME="soundon" -->
<script type="text/javascript" language="javascript">
if ( get_cookie( "kohastaffsound" ) == "yes" )
	{
	document.write('Sounding...');
	document.write('<embed src="/intranet-tmpl/prog/sound/beep.wav" hidden
autostart="true" loop="false" />');
	}
</script>
<!-- /TMPL_IF -->

in Circulation.tmpl

along with a cookie (kohastaffsound) controlled audio on and off (note the
syspref "soundon" also) which is set by a toggle button in header.inc (may not
be the best place)

<script type="text/javascript" language="javascript">
if ( get_cookie( "kohastaffsound" ) == "yes" )
	{
	document.write('<img src="/intranet-tmpl/prog/img/famfamfam/silk/sound.png"
onClick=\'delete_cookie ( "kohastaffsound" ); window.location.reload();\' >');
	}
else
	{
	document.write('<img
src="/intranet-tmpl/prog/img/famfamfam/silk/sound_mute.png"
onClick=\'set_cookie( "kohastaffsound", "yes", 2020, 01, 01 );
window.location.reload();\' >');
	}
</script>

That is about it, which is fine, except the silly <EMBED is weird and flashes
the screen as well as slows everything down. I think if I aim for a very small
audio file this could be improved, however, there is a delay with the <embed.

With <Embed we have

* Firefox 3.6 there is a delay and an entire screen refresh, but works the best.

* Chrome 4 there is a delay, then the sound plays late, and it even messes up
the formatting

*  IE8 - worked great- loads quick - , but not so with Firefox which is a must

* Opera - Worked the best, very quick load on Circ, but other things did not,
unrelated the sound changes

It seems one way to get around this is to NOT use Embed, and instead use Java
with a class (open source of course) to handle playing a sound on demand. 

Has anyone else thought about this or experimented. The issue is mainly with the
browsers and the lack of support for sound. Using straight javascript to play
the sound works worse than embed across the browsers, which is probably why
Jquery doesn't have a good sound plug-in. 

I think the reason sound is important, is so at the *end* of a transaction
(check-in / out) there is a beep, to speed up these tasks. Also, when there is
an exception on a book (missing barcode) there should be an audible warning.
These are often missed, because Koha does not have sound cues, and other ILS
systems do. 

What do you all think?

Darrell Ulm





_______________________________________________
Koha-devel mailing list
Koha-devel at nongnu.org
http://lists.nongnu.org/mailman/listinfo/koha-devel



More information about the Koha-devel mailing list