Last active
May 25, 2016 15:44
-
-
Save dtauer/404576f6c550c61a3a37c812fc7d30e9 to your computer and use it in GitHub Desktop.
Listening for Captivate play/pause events
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//More API documentation here: https://helpx.adobe.com/captivate/using/common-js-interface.html | |
//You'll want to have this AFTER the captivate file is initialized (e.g. after cpInit() is called) | |
if(window.cpAPIInterface && window.cpAPIEventEmitter) | |
{ | |
//add a listener to for pause event | |
window.cpAPIEventEmitter.addEventListener("CPAPI_MOVIEPAUSE", function(e){ | |
console.log("captivate timeline paused"); | |
}); | |
//add a listener to CPAPI_SLIDEENTER event | |
window.cpAPIEventEmitter.addEventListener("CPAPI_MOVIERESUME",function(e){ | |
console.log("captivate timeline resumed"); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment