|
Rather than a fixed timeout wouldn't it be better to make the SCORM instantiation dependent on the creation of the API object?
For example, API.php writes out "var API = new SCORMapi1_2();" near its final lines, so the SCO href change could be made then or on a window.setTimeout() callback. Thus a single line warning about load delay could be shown (easier to translate) and the wait time reduced to the bare minimum. Alternatively a combination of window.onload events and a script load counter could be used to trigger the page transfer earlier from a higher point in the window chain once the necessary dependants have been loaded into the script host. Particularly where there are multiple SCO assets within a package it gets quite tedious to wait for so long during content navigation, by which point the scripts are likely to have been cached in the browser session in any case. Could you at least reduce the 3-second wait back to the 2-second one you had before? The JS code written by loadSCO.php could be adjusted to use the condition "if (cSeconds > 1)" instead of "if( cSeconds )" we couldn't just reduce the limit from 3 seconds to 2 as it just isn't enough for IE to ALWAYS work. - there were a range of issues in the tracker and in the forums related to this - increasing to 3 seconds has reduced the amount of tracker items and forum posts we've had to deal with!
but.... we could look at improving it to be more intelligent - feel free to submit a patch and we'll review it thanks,
Dan |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
the 3 second delay has been there for a long time(definitely pre 1.9.1) it's just that this wasn't communicated well to the user - it just showed a blank page until the SCORM loaded, and some users would refresh a few times causing other issues. - It just provides feedback to the user that it is loading and to be patient.
this delay is needed to allow all the api stuff to load correctly in all browsers before loading the scorm object. - without the delay, many scorm objects just won't play, as the browser hasn't loaded all it needs.
see
MDL-14492for more info on the timer thingy.