BackBackNextNext
4.7 Provide Global Control of Audio
This feature is available in Web Course builder version 6.0.12+. You can provide your students with the ability to turn off (or on) the audio when pages load. If your course pages have audio that automatically plays when it loads, this button allows students to turn off future audios from playing when the page displays.
  1. Download the two icons (below) and place them in the graphics folder for the course.

    Audio On Audio Off


  2. Copy the JavaScript code below, choose Edit > Course Properties and paste the code in the Optional: Text/Graphics placed at the end of every page field.

    <div id="toggleaudio" style="position:absolute;bottom:10px;right:10px;"
    onclick="ToggleSound();"><img name="audioonoff"
    src="../graphics/audio_on.png" title="Click to disable audio auto-start"></div> <script type="text/javascript">
    audioon = new Image();
    audioon.src = "../graphics/audio_on.png";
    audiooff = new Image();
    audiooff.src = "../graphics/audio_off.png"; var obj1; function getElem(nam) {
    if(document.all) {
    return document.all[nam];
    } else if(document.getElementById) {
    return document.getElementById(nam);
    } else {
    for (iLayer = 1; iLayer < document.layers.length; iLayer++) {
    if(document.layers[iLayer].id == nam)
    return document.layers[iLayer];
    }

    }
    return null;
    }
    obj1 = getElem("toggleaudio");
    if (parent.bStopAudio == false) {
    obj1.innerHTML = '<img name="audioonoff" '+ 'src="../graphics/audio_on.png" '+ 'title="Click to disable audio auto-start">';
    } else {
    obj1.innerHTML = '<img name="audioonoff" '+ 'src="../graphics/audio_off.png" '+ 'title="Click to enable audio auto-start">';
    }
    function ToggleSound() {
    obj1 = getElem("toggleaudio");
    if (parent.bStopAudio) {
    parent.bStopAudio = false;
    obj1.innerHTML = '<img name="audioonoff" '+ 'src="../graphics/audio_on.png"'+ ' title="Click to disable audio auto-start">';
    document.images["audioonoff"].src = audioon.src;
    } else {
    parent.bStopAudio = true;
    obj1.innerHTML = '<img name="audioonoff" '+ 'src="../graphics/audio_off.png" '+ 'title="Click to enable audio auto-start">';
    document.images["audioonoff"].src = audiooff.src;
    }
    }
    </script>

      BackBackNextNext
      Tips Using ReadyGo WCB
      1. Questions
      2. Hidden features
      3. Page Tips
      4. Course Tips
      5. SmartPhone Tips
      Bookmark Page
Go to Bookmark