Make Captivate play again after pausing - with Javascript
I hope I am missing something simple. I have 2 buttons: play_nav and pause_nav. Play_nav is hidden. Both buttons, when clicked call the same javascript function. The function hides the calling button and shows the other. The function is supposed to pause or play the movie.
But...
I can only get the movie to pause, nothing I do will make the movie play again. Below is my code, you can see all the commented out parts are different ways I have tried to make the player start again, but nothing seems to work.
I am using Captivate 2017 on a Mac.
Any ideas would be a great help!
function PLaD_pausePlay(theButton){
if(theButton=="pause"){
console.log("**** pause button clicked ****");
cp.show("play_nav");
cp.hide("pause_nav");
cp.movie.pause(cp.ReasonForPause.PLAYBAR_ACTION);
}else{
console.log("**** play button clicked ****");
// cpCmndPause = false;
//cp.movie.paused=false;
//window.cpCmndResume=1;
//cpAPIInterface.setVariableValue("cpCmndResume",1);
// cp.actionChoiceContinueMovie();
//window.cpAPIInterface.play();
//cp.playPause(cp.ReasonForPlay.PLAYBAR_ACTION);
cp.movie.play(cp.ReasonForPlay.PLAYBAR_ACTION);
cp.hide("play_nav");
cp.show("pause_nav");
}
