Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Captivate 9 - Simulation and Web Objects

New Here ,
Oct 03, 2016 Oct 03, 2016

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?

260
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 03, 2016 Oct 03, 2016

Hey Matt,

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

Cheers

Steve

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 03, 2016 Oct 03, 2016

Hi Steve,

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

-Matt

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 03, 2016 Oct 03, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Oct 03, 2016 Oct 03, 2016
LATEST

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'

  );

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources