well, in the first image you see the error "API.LMSInitialize is not a function" and just below that "API: [object Window]" - I think that's the source of your problem.
It should be "API: [object Object]" and the API object needs to have the following functions defined on it:
- LMSInitialize
- LMSGetValue
- LMSSetValue
- LMSCommit
- LMSFinish
- LMSGetLastError
- LMSGetErrorString
- LMSGetDiagnostic
Given that it works OK in SCORM Cloud I think it probably is an issue on your LMS.
This is the key part of the 'find SCORM API' code. Seems like it might be finding something else (a browser window going by the [object Window] reference you're getting) that has the same name as the SCORM API..?
I can also see some errors that appear to be from your LMS e.g.