Audio On/Off Option

canyonkiva
canyonkiva Community Member Posts: 44

Just a thought, but have you tried this from a web server? I've had similar issues with audio not working when published to html and played from my desktop, but when I put them on a web server the audio works.

canyonkiva said:

The goal is to give the student an audio on or off button that is a global element available on every page. If the student clicks audio on, the audio plays on every page until the student clicks audio off. (Using Lectora Professional Publishing Suite v.9)

A variable was created called var_audio and set to 0.

On each page there is an audio on button and an audio off button with the following:

When the student clicks the audio on button,there are 4 actions, all on click:

1. Modify Variable - Target var_Audio - Value 0 - Modification Type - Set Variable Contents.

2. Play Audio - audio name

3. Show speaker on image

4. Hide speaker muted image

When the student clicks on the audio off button there are 4 actions, all on click:

1. Modify Variable - Target var_Audio - Value 1 - Modification Type - Set Variable Contents.

2. Stop Audio - audio name

3. Show speaker muted image

4. Hide speaker on image

Each page also has 3 actions, all On Show:

1. Play audio - audio name if var_Audio equals 0

2. Show speaker on image if var_Audio equals 0

3. Show speaker muted image if var_Audio equals 1

Audio objects are NOT set to auto start.

This works when in Lectora's preview mode and when published to an exe. But when published to html and viewed using IE, it does not work. Var_audio is set to 0 entering the course but the audio doesn't play and the speaker on image doesn't show until after the Audio On button is clicked. This has to be done on every page before the audio will play and the speaker image will display. An interesting sidenote is that the html file works when viewed using Firefox.

Does anyone know a workaround?