H5P NodeJS Library
    Preparing search index...

    The options that can be passed to the constructor of H5PPlayer

    interface IH5PPlayerOptions {
        customization?: {
            alterLibraryFiles?: (
                library: ILibraryName,
                scripts: string[],
                styles: string[],
            ) => { scripts: string[]; styles: string[] };
            global?: { scripts?: string[]; styles?: string[] };
        };
        lockProvider?: ILockProvider;
        permissionSystem?: IPermissionSystem;
    }
    Index

    Properties

    customization?: {
        alterLibraryFiles?: (
            library: ILibraryName,
            scripts: string[],
            styles: string[],
        ) => { scripts: string[]; styles: string[] };
        global?: { scripts?: string[]; styles?: string[] };
    }

    Enables customization of looks and behavior See the documentation page on customization for more details.

    Type declaration

    • OptionalalterLibraryFiles?: (
          library: ILibraryName,
          scripts: string[],
          styles: string[],
      ) => { scripts: string[]; styles: string[] }

      This hook is called when the player creates the list of files that are loaded when playing content with the library. Note: This function should be immutable, so it shouldn't change the scripts and styles parameters but create new arrays!

    • Optionalglobal?: { scripts?: string[]; styles?: string[] }

      Lists of JavaScript and CSS files that should always be appended to the list of core player files.

    lockProvider?: ILockProvider

    A lock provider to use. By default, the library uses a single-process lock. You must pass in a distributed lock implementation if the library is used in a multi-process or cluster environment.

    permissionSystem?: IPermissionSystem