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.
I can add my code if necessary...
Since I can't edit the original message, some more information...
Do they have to click the play overlay at the start or does it just try to jump to the time?
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?
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.
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 😞
Thank your for your help!
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.
This bug can't be solved, but I found a workaround which I will describe for future reference:
Needless to say, this isn ugly workaround. I still have to check it, but it seems to work.