The role of preloadedDependencies property in h5p installation package and in h5p library
The property "preloadedDependencies" occurrs in two files:
- h5p.json file of a .h5p package
- library.json file of a library
These properties have different values. For example for MultiChoice, in library.json the preloadedDependencies is an array of 4 dependencies (EmbeddedJS, H5P.JoubelUI, FontAwesome and H5P.Question) and in json.h5p it is an array of 9 dependencies, including those 4 plus some extra (H5P.Image, H5P.Transition, Drop, Tether and the MultiChoice itself).
On a Drupal site there is a page which lists library usage. I noticed that installing a library like the one above only increments usage for the 4 libraries from library.json and the extra existing in h5p.json remains the same.
The documentation says:
In h5p.json - Libraries that are used by this content type and needs to be preloaded for this content type to work.
In library.json - Libraries that need to be loaded for this library to work.
I can't figure out from the documentation, why are the "preloadedDependencies" values different in both files? Shouldn't they be the same? What is the role of the extra dependencies which are only in h5p.json and don't increment library usage?