h5p's policy towards 3rd party libraries and features currently only supported by specific browser

serettig's picture

Hi,

I've been wondering what H5P's policy on the use of 3rd party libraries is. So, what can developers use when writing for H5P? I'm thinking of open source JavaScript libraries like Ractive.Js. Is this something that developers can freely use when writing code? Or should they be completely avoided and only pure JQuery code is accepted? Or is there a fixed set of libraries that are already in use and which developers should limit themselves to?

Furthermore, what about features like Web Speech API currently only supported by Google Chrome? Has a library using technology that is not cross-browser (at the moment) ever a chance of being accepted as a regular H5P content type?

And finally: Are there version numbers for the oldest browser that must be supported?

Cheers
Sebastian

thomasmars's picture

Hi Sebastian.

Great questions.
H5P strive to be as unopinionated about the "technologies" used within them as possible, so that developers can choose whichever frameworks they wish and feel the most comfortable with. As long as the library's license permits, you should use whatever you feel like.

Examples of some official libraries already relying on 3rd party JS libraries:

- Questionnaire uses webpack and babel
- True/False uses karma and jasmine
- Interactive Video uses shepherd tether

Even core uses CKEditor and fabric.js.

JQuery is also included by default in core, so you can use this without including it in your library to easily get developers started on new content types.

The developer is free to choose which browsers he wants to support. There already exists a library using the Web Speech API through Annyang, you can have a look at github. In these cases it is important to have decent error messages when the library is not supported.

As a rule of thumb the official libraries support the two latest versions of Chrome, FireFox, Safari and IE/Edge.

Best regards,
Thomas