VHost Support

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:
  1. Call the loadAudio() command: loadAudio('audioLoaded')

  2. 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.

  3. 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      

© Oddcast Inc. All rights reserved.   |   Terms of Use   |   Terms of Service   |   Privacy Policy