You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using the standalone player on our Wikonnect platform (single page application) and also @lumieducation/h5p-webcomponents package for the editor.
I have noticed when a user visits the standalone player, it sets the following H5P global integration properties.
When the user later visits the H5P editor page, the merge utility function of the library
does not include the missing new properties as below
The above merged H5PIntegration object not include hubIsEnabled property.
This will signal the H5P core editor library to make an Ajax GET request for the available local content-type libraries as per this LOC
Thus,
i) can the H5P integration merge function include all new properties on resultant window.H5PIntegration object
ii) or the GET/ajax?action=libraries endpoint fallback to retrieving all libraries information if machineName, + majorVersion+minorVersion parameters don't exist?
The text was updated successfully, but these errors were encountered:
It would be easy to simply copy over the hubIsEnabled property, but I guess there are more properties that must be merged into the object if the H5PIntegration object comes from a different system. The current implementation assumes that H5P is only used with our implementation and that's why the merge is only partial.
My idea would be to use a deep merge library to simply merge the complete integration objects, except for the contents property, in which I would replace the whole content objects, to avoid issues if you switch from player to editor for the same content id. I think it would be safe to do that... Any thoughts @mimidotsuser ?
Libraries ,browser, and operating system info:
Issue description:
We are using the standalone player on our Wikonnect platform (single page application) and also @lumieducation/h5p-webcomponents package for the editor.
I have noticed when a user visits the standalone player, it sets the following H5P global integration properties.
When the user later visits the H5P editor page, the merge utility function of the library
H5P-Nodejs-library/packages/h5p-webcomponents/src/h5p-utils.ts
Line 8 in b0c2c10
does not include the missing new properties as below
The above merged
H5PIntegration
object not includehubIsEnabled
property.This will signal the H5P core editor library to make an Ajax
GET
request for the available local content-type libraries as per this LOCThus,
i) can the H5P integration merge function include all new properties on resultant
window.H5PIntegration
objectii) or the
GET
/ajax?action=libraries
endpoint fallback to retrieving all libraries information ifmachineName
, +majorVersion
+minorVersion
parameters don't exist?The text was updated successfully, but these errors were encountered: