Hi,
We have been building a SCORM compliant LMS, and have been facing a cross-origin problem.
The Scenario is, our LMS is built with ReactJs for the client-side on " Domain A " along with asp dot net core web API as a server-side on " Domain B ". The SCORM content lies on the server-side of course.
When I try to run a SCORM course in an iframe (ex: <iframe src="Domain_B\path_to_scorm_index"></iframe>
) in my SCORM player component, I get this error Uncaught DOMException: Blocked a frame with origin "Domain B" from accessing a cross-origin frame. at findAPI ...
.
It happens when the SCORM APIWrapper.js
tries to access the parent window to find the API
provided by scormAPI.js
.
I tried to put the scormAPI.js
on the server-side and run the course in a new separate window like <script src="Domain_B\scormAPI.js"></script><iframe src="Domain_B\path_to_scorm_index"></iframe>
, but still get the same error.
Has anyone run into the same problem before and managed to solve it?
Or can anyone give me a hint on how to get through this problem?