Skip to main content
Inspiring
Mar 14, 2018 8:20 PM UTC
Answered

audio event listeners in Captivate?

Hello!  Is there a way to attach event listeners to audio clips inside Captivate?  I need to trigger some events when audio ends, and prefer to do it without setting timeouts or waiting for a manually entered frame.

Thank you very much!

This topic is closed to new replies. Start a new post to keep the conversation going.
anton9800Correct answer
Inspiring
Mar 15, 2018 1:31 PM UTC

this.onEndedCallBackFn function inside CPM.js does this - from there I was able to toggle all that I needed on audio end for every slide

2 replies

digitaly
Participating Frequently
Nov 21, 2018 8:13 PM UTC

I realize this question already has an accepted answer and that is a good solution, but I thought I'd throw in what I learned in case anyone doesn't care to mess with CPM.js files.

I used:

   aud = cp.movie.audioManager.currentSlideAudio;

   audHandle = cp.movie.audioManager.slideAudios[aud].nativeAudio;

   audHandle.onended = function(){

      //do stuff

   }

to an on slide enter action to add an event listener to the slide audio for that slide.

Translate
anton9800AuthorCorrect answer
Inspiring
Mar 15, 2018 1:31 PM UTC

this.onEndedCallBackFn function inside CPM.js does this - from there I was able to toggle all that I needed on audio end for every slide

Translate