Merge branch 'pr/451'

This commit is contained in:
Jonathan Putney
2022-02-11 08:03:59 -05:00
2 changed files with 24 additions and 21 deletions

View File

@@ -62,9 +62,9 @@ The APIs include several settings to customize the functionality of each API:
| `xhrWithCredentials` | false | true/false | Sets the withCredentials flag on the request to the LMS |
| `xhrHeaders` | {} | Object | This allows setting of additional headers on the request to the LMS where the key should be the header name and the value is the value of the header you want to send |
| `responseHandler` | function | | A function to properly tranform the response from the LMS to the correct format. The APIs expect the result from the LMS to be in the following format (errorCode is optional): `{ "result": true, "errorCode": 0 }` |
| `requestHandler` | function | | A function to transform the commit object before sending it to `lmsCommitUrl`. By default it's the identity function (no transformation). |
| `onLogMessage` | function | | A function to be called whenever a message is logged. Defaults to console.{error,warn,info,debug,log} |
## Initial Values
If you want to initially load data from your backend API, you must do it before launching your SCORM/AICC player. After the player has initialized, you will not be able to change any read-only values.