|
Preload Audio
Available for Studio & SitePal
|
|
To pre-load the audio track in order to achieve a faster effect when calling the sayAudio() command do the following:
- Call the loadAudio() command: loadAudio('audioLoaded')
- Use the Javascript event function vh_audioLoaded(args) in the HEAD section to check if the audio track is loaded:
"function vh_audioLoaded(args){"
In this example you will see a JavaScript alert displayed when the audio is ready.
- When the audio is loaded, play it using the sayAudio() command: "sayAudio(args);"
Note: In this example we check to see if the audio was loaded and only then play it.
The audio will play even if the pre-load was not done yet.
|
|
Back to Previous Page
|