Copy link to clipboard
Copied
I’m in the process of making a widget for captivate. I have been having issues with images not being accessible with my javascript, sometimes. The issue that I have been able to track down that a line of code seems to only retrieve 4 of the img json files that captivate generators.
I am getting the json files with the images with: ‘window.parent.cp.imagesJSONCache’
The result I get when I console.log is
Looking through this object, the image that I need does not exist in these json files that were retrieved.
I can use ‘window.parent.cp.imageToJSONPathMap’ to pull information of which json file the image lives in. In my screenshots I need the img2.json which isn’t loaded with the JSONCache.
I don’t know if there is a way to get in ALL the json files or grab the one I need with javascript if it doesn't load. Or if there should be another route I should be taking to get these images?
Copy link to clipboard
Copied
Not 100% production ready or tested, but the basics work