I use 'scorm-again' javascript library in my angular 16 application to display SCORM content. SCORM API initialized successfully then I am getting an error: DisplayError, strMessage=Error initializing communications with LMS. My LMS running in localhost. always SCORM content showing in a popup window. but I am using
// scorm.component.ts
`import { Component, OnInit } from '@angular/core';
declare var Scorm12API;
I use 'scorm-again' javascript library in my angular 16 application to display SCORM content. SCORM API initialized successfully then I am getting an error: DisplayError, strMessage=Error initializing communications with LMS. My LMS running in localhost. always SCORM content showing in a popup window. but I am using
// scorm.component.ts `import { Component, OnInit } from '@angular/core'; declare var Scorm12API;
declare global { interface Window { API: typeof Scorm12API; } }
@Component({ selector: 'app-scorm-again-player', templateUrl: './scorm-again-player.component.html', styleUrls: ['./scorm-again-player.component.scss'] }) export class ScormAgainPlayerComponent implements OnInit { externalUrl:string = "assets/scorm/dummy_scorm/dummy_scorm/scormdriver/indexAPI.html";
constructor() {}
ngOnInit() { const settings={commitUrl:'http://localhost:4200'}
}
}`
// scorm.component.html
<iframe [src]="externalUrl | safe" height="600" width="1000" title="" id="scormIframe"></iframe>