Overview of the Content Type Hub
The hub is a centralized repository for H5P libraries that makes it easier for content creators to discover and adopt new content types.
Previously, all libraries in the H5P ecosystem were released as a big package. This required the H5P site administrator to seek out, download and install all the libraries H5P has to offer whenever he wanted an update of a single library feature.
By showing a complete overview of available libraries directly on your site, the Hub enables users to easily find their favourite content types, discover the latest and freshest content types or look through the improved descriptons and find a content type for their specific use-case.
The Hub also allows for a more agile H5P ecosystem where packages can be released independently of each other. We hope this will lead to an even more thriving H5P ecosystem as the updates are delivered directly to you, instead of you having to seek them out.
Moving towards a centralized place for all developers to share their libraries will make it easier for developers to share their content types independently of the H5P core team. We are particularly excited about how this could be a huge step towards a more open flow of community-driven content types. The addition of metadata to each content type will work towards making contributed content types discoverable, and exposing the amazing developers that work hard under the radar in the H5P community.
The sharing and discoverability part of the hub is very much in line with H5Ps vision of empowering everyone to create, share and reuse interactive content. We hope you’ll like it!
There are three main parts comprising the H5P Hub ecosystem
The Hub is a centralized repository that stores all metadata for all content types that are available through the Hub.
The plugin is the H5P plugin that you have installed on your server, enabling the server to deliver and produce H5Ps.
The client are the users of your server, where H5Ps are created and viewed.
The centralized repository contains all officially registered H5Ps from H5P.org. Developers may apply for developer access to share their own content types to make them part of the libraries that the HUB provides. The centralized repository’s main function is to make content more discoverable, we do not wish to put constraints on what developers can share, so as soon as you have developer access you may share freely of your creations.
The hub stores all metadata that has been registered for each library. With these additionally searchable data authors of content types can attract the correct audience for their content types more granularly.
The title for your library, i.e. Course Presentation
Short description of what your library achieves
A more in depth text on how the library can be used
An optionally provided vector graphic to distinguish your content type from others
Screenshots that may illustrate different use-cases for the library and show how the author and view part coincide
A license which dictates how the library may be used
Example content for showing a real use of the library
An optionally provided tutorial on how to author good content
Searchable keywords for making the library more discoverable, e.g. “math”, “geometry”, “pythagoras”
Categories to distinguish between intended use of the library, e.g. “game”, “educational”
The creator or organization behind the library
The hub is thus responsible for exposing an API that the H5P plugin can use to gather this centralized library information. The hub also exposes the packages for installing the libraries provided in this central repository.
There are several changes to the plugin to facilitate moving integration of the Hub. The biggest change is that the plugin caches a complete list of the latest content types that the hub provides to minimize the frequency that the plugin has to talk to the Hub.
The plugin will update its replica of the Hub libraries at regular intervals provided by the plugin ecosystem. You may also update the cache manually through the H5P Libraries page.
Installing external libraries is also handled here. The user may tell the plugin when they wish to install a new library. The plugin will check that the user has the necessary permissions and then fetch the library from the Hub, before finally validating and installing the library on your server, making it possible for the user to unleash his creativity.
Since the plugin is responsible for talking to the hub we recommend an SSL enabled server to make sure that your server is talking to the correct source.
The client is the place where all the visual differences will be made evident. The selector for choosing library has been completely revamped with a modern look.
You are now able to browse through the available libraries, find your favourite libraries and discover new ones.
The client asks the plugin for an updated list of the libraries gathered from the hub and serves this to all users. The user will then immediately be able to use the authoring tool of the chosen library.
Content type cache
The content type cache, as mentioned earlier, is a cached replica of the available libraries from the Hub. It is a concept that you should familiarize yourself with.
To be able to provide your users with all the latest libraries from the H5P Hub, it is important to update this cache often. This can be done by configuring how often the content type cache update should run in your CMS. It can also be updated manually through the H5P Libraries page.
Mon, 06/10/2019 - 13:27
How to change an existing core library to a specific need??
I want to H5P.MultiChoice with two more fileds how can I make those changes to the library so that I could add some additional information to each question. Please guide how should I approcah this? Thank you. I am using H5P with Drupal 8.
Tue, 06/11/2019 - 05:51
Hi goku_dash,You can read
You can read about making changes to the code here. Please note that development is only supported for Drupal 7.
Tue, 06/11/2019 - 11:16
Hi BV52, Thank you for quick response
Yes, I am following given link but nothing working for me right now. I am using Drupal 8 could the given Developer guide is recommended for Drupal 8, can it be used to make changes to the library. Also confused about the config that makes it possible to add a h5p content-type into the Drupal form. Now its just asking me to upload .h5p content file. How can I built content in the Drupal itself .. not from the hub and downloading the files and so on.
Could you share some insights how content types work with h5p with libraries. In which level chnages should be made? Is there any working code snippets that I can follow ..?
Wed, 06/12/2019 - 03:41
Hi goku_dash,My coding skills
My coding skills are novice at best but I know this much the libraries that is used by all platforms are the same. Having said this it should be possible to make the changes using the development mode of Durpal 7 making sure that the version number is higher that the current one and upload a sample content to Drupal 8.
A word of caution if you do this, if there is an update to the contents it will overwrite your previous changes and you would have to either rewrite your code or replace the libraries in Drupal 8 by adjusting the version number. This could in turn cause you not to be able to use the new features that comes with the official release as well as bug fixes.