H5P NodeJS Library
    Preparing search index...

    Offers functionality to create .h5p files from content that is stored in the system.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Creates a .h5p-package for the specified content file and pipes it to the stream. Throws H5pErrors if something goes wrong. The contents of the stream should be disregarded then.

      IMPORTANT: This method's returned promise will resolve BEFORE piping to the writeable has been finished. If you outputStream is directly piped to a download that's not an issue, but if you do something else with this stream, you have to wait for the piping to finish by subscribing to the 'finish' event of the stream!

      Parameters

      • contentId: string

        The contentId for which the package should be created.

      • outputStream: Writable

        The stream that the package is written to (e.g. the response stream fo Express)

      • user: IUser

      Returns Promise<void>