Copy link to clipboard
Copied
Hi all,
I use the window.cpAPIInterface.navigateToTime(ms) method to let the user navigate to a certain time in a HTML5 module:
This works fine in Firefox and Chrome, (no errors at all), but Safari throws an error in the console:
Unhandled Promise Rejection: AbortError: The operation was aborted.
(anonymous function)
rejectPromise
It refers to line 11106 of CPM.js but it's a bit above and beyond my skills to understand and solve this.
Questions:
I can add my code if necessary...
Copy link to clipboard
Copied
Since I can't edit the original message, some more information...
Copy link to clipboard
Copied
Do they have to click the play overlay at the start or does it just try to jump to the time?
Copy link to clipboard
Copied
Thank's for the reply
To answer your question: they have to click the overlay (which doesn't bother me). Basically, I use an external script which is loaded on the first slide, and then takes the user to the desired position.
But I was already able to narrow the problem down:
1. The error above is unrelated
2. However, the problem also appears if I don't use my script:
It seems that Safari needs the sound file of a slide to be loaded before it can jump to a certain part of that file. Can I somehow check whether the sound file is loaded? Or any other ideas?
Copy link to clipboard
Copied
For what it is worth...
I always make my audio play based on an event that is triggered by the learner rather than playing automatically at any given point. When it comes to slide narration, especially if it is just a word for word reading of the slide - that means providing a little speaker icon of some sort. If the learner wants to listen they can click it - otherwise if they are fine to just read what is there - they are not forced to listen.
Of course - I am not sure whether that will work with the way you have this designed but perhaps the thought may help determine a solution.
Since everything I do personally is event driven rather than time driven - I do not make use of such commands and my timelines are basically just to help me layer items and they typically just stay at my default of 1 second duration.
That being said, I hope this was helpful in some way.
Copy link to clipboard
Copied
Thanks for the reply, but I think that we use Captivate in a different way.
I understand what you're saying, but I provide instructions/narration that can be muted. My modules are not very interactive, they basically demonstrate how to use a certain app.
Nevertheless, it can be handy to "deep-link" to a certain time (if that is a concept one uses) in the module and Captivate seems to offer that. Except for the Safari bug 😞
Copy link to clipboard
Copied
Instead of using an advanced action that initiates JavaScript, why not simply use the Assign the variable cpCmndGotoFrameAndResume with the literal value of what frame in your eLearning course you want to jump to? In Captivate there are 30 frames per second so if you wish to jump to the 1-minute mark in your course you would enter in the value 1800, for example.
Copy link to clipboard
Copied
Hi Paul,
Thank your for your help!
I put it in an external JavaScript file because
I already tried your suggestion:
I'm running out of ideas here. I used an addEventListener for cpInfoCurrentFrame and Safari's console shows nicely that the frames stop progressing (!!!). Maybe I can do something with that observation, but it looks like a dirty hack to me.
Copy link to clipboard
Copied
This bug can't be solved, but I found a workaround which I will describe for future reference:
The problem
The diagnose
The hack
Needless to say, this isn ugly workaround. I still have to check it, but it seems to work.