The H5PField type contains all the different types of fields that
H5P's semantics.json describes.
When defining fields in semantics, the type property is used to mark
what type of field it is. Each field type has its own set of properties
and each field type is described in its own H5PField type.
H5P fields can be one of the following types:
H5PFieldAudio
H5PFieldBoolean
H5PFieldFile
H5PFieldGroup
H5PFieldImage
H5PFieldLibrary
H5PFieldList
H5PFieldNumber
H5PFieldSelect
H5PFieldText
H5PFieldVideo
The InferParamTypeFromFieldType utility type can be used to infer
the type of a field based on its type property:
See
https://h5p.org/semantics
The H5PField type contains all the different types of fields that H5P's
semantics.json
describes.When defining fields in semantics, the type property is used to mark what type of field it is. Each field type has its own set of properties and each field type is described in its own H5PField type.
H5P fields can be one of the following types:
H5PFieldAudio
H5PFieldBoolean
H5PFieldFile
H5PFieldGroup
H5PFieldImage
H5PFieldLibrary
H5PFieldList
H5PFieldNumber
H5PFieldSelect
H5PFieldText
H5PFieldVideo
The
InferParamTypeFromFieldType
utility type can be used to infer the type of a field based on its type property:Example
The
InferParamsFromSemantics
utility type is a more advanced version which will infer the type of all fields in asemantics.json
file:Example