audio.settings.disable

getAudio(id).settings.disable()

or getAudio(id).settings.disable(opacity) (since PennController 1.6)

Will disable the controls interface. Note that some browsers might be render disabled interfaces as a plain gray rectangle with no controls visible whatsoever.

If you pass no parameter, a 50% opaque layer will be printed on top of the interface. You can pass a value from 0.01 (fully transparent***) to 1 (fully opaque) to control the aspect of the layer.

*** the value 0 is mistreated as no-parameter by PennController 1.6, hence the need to use a non-null value close to 0.

Example:

[js highlight=”3″ try=”true”]newAudio(“test.mp3”)
.print()
.settings.disable()
.play()
.wait()[/js]

Prints a disabled interface for the audio test.mp3 and starts playing it.

Published by Jeremy

Researcher in semantics and pragmatics; Programmer of PennController for IBEX