The only other thing I can think of would be to start AutoPlay when the Juicebox-Pro API determines that the first image has been displayed for the first time (using the onImageChange event).
Try the following:
<!--START JUICEBOX EMBED-->
<script src="jbcore/juicebox.js"></script>
<script>
var jb = new juicebox({
containerId: "juicebox-container",
autoPlayOnLoad: "FALSE",
enableAutoPlay: "TRUE",
goNextOnAutoPlay: "FALSE"
});
var flag = false;
jb.onImageChange = function(e) {
if (flag === false && e.id === 1) {
jb.toggleAutoPlay();
flag = true;
}
};
</script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->If this still does not help, then you might need to use a setTimeout() delay (as I noted in my post above) or tweak your gallery's imagePreloading value and/or your image sizes (although I understand that you do not want to do this).
One more thing I'm not sure about, is the use of the config.xml file. As it contains the same statements...do I have to change anything in this file?
You can set configuration options in the gallery's XML file, in the embedding code or via a query string in the URL.
Please see the Setting Config Options support section for details.
If you have a certain configuration option set in both the embedding code and the XML file, then the value from the embedding code will take precedence. (Options set via the query string will override both embedding code and XML file options.)
I chose to add the configuration options required for my code to function correctly to the gallery's embedding code simply to keep my suggestion to a single chunk of code. You can set all your configuration options in your gallery's 'config.xml' file without any problem.