I'm implementing SCORM playing functionality in a Next.js-based LMS. I have a functional player that can load and play SCORM packages stored in an S3 bucket, accessed via a Next.js API route acting as a proxy. This setup works perfectly for self-contained SCORM packages: I provide the SCORM API to the global window
, packages find it, and I can track/save progress.
However, I’m facing issues with SCORM packages from sources like cloud.scorm.com
. These packages don’t contain the actual SCORM content but instead load it by:
I'm particularly having issues with the popup. Since these packages attempt to access window.parent
to locate the SCORM API but are on a different domain, the browser’s cross-origin restrictions block access, and I can't figure out how to bridge this communication.
Has anyone dealt with this kind of SCORM setup, where the package relies on a cross-origin popup or iframe? Any advice would be greatly appreciated!
I’ve not been able to come up with any solution so far.
It turned out to be some strange behavior caused by running on localhost. After uploading to the development server, everything worked