Skip to main content
Participant
October 3, 2016
Question

Captivate 9 - Simulation and Web Objects

  • October 3, 2016
  • 3 replies
  • 306 views

I added in a web object that holds a simulation recording (through a URL). The web object is hidden to the slide and is shown through an advanced action once a user clicks a button. Does anyone know how to communicate with the html in the web object (the player) in order to disable the audio from playing after I hide the web object?

This topic has been closed for replies.

3 replies

TLCMediaDesign
Inspiring
October 3, 2016

The easiest way to do this is to set a variable in the parent Captivate file or if you are using a specific button, add a listener in the child Captivate file to listen for the button click and pause the audio. To use the variable, create a variable stopAudio = 0; When you hide to WO set the stopAudio = 1;

Either way you will need listeners in the child Captivate file.

Listen for the button:

window.parent.document.getElementById( 'you button name' ).addEventListener( 'click', function () { stopAudio()});

function stopAudio()

{

     //do your magic to stop the audio here

}

or listen for the value of the variable to change:

window.parent.window.cpAPIEventEmitter.addEventListener( 'CPAPI_VARIABLEVALUECHANGED', function ()

  {

   stopAudio()}, 'stopAudio'

  );

Participant
October 3, 2016

Hi Steve,

The simulation is a published package from Captivate (index.html). I am calling on it through a server.

-Matt

Inspiring
October 3, 2016

Thanks Matt,

So technically, you want to communicate between two projects. The one you have and the one you are calling an "animation" on your server. Is that correct?

If it is,  then I believe what you want to do is technically possible, but above my "knowledge-grade"  I will leave it for others to advise.

Cheers

Steve

Inspiring
October 3, 2016

Hey Matt,

Interesting question. Is your simulation and OAM file or is it a video?

Cheers

Steve