Configuration
General options
Section titled “General options”buttonGroups: Controls the generation of button groups.
Using the buttonGroups array it is possible to define new button groups without having to implement a plugin. You only need to have an image in svg format in the same path where the configuration file is located in order to create button groups using this section.
For more information, please refer to the documentation on button groups.
config.json
{ "buttonGroups": [ { "enabled": true, "groupName": "options", "description": "Configuration options", "icon": "settings-icon.svg", "order": 4, "side": "right", "parentContainer": "playbackBar", "menuTitle": "Options" } ]}cookieConsent: Defines the cookie consent settings required by the European General Data Protection Regulation, to be used when using paella-core’s internal cookie APIs. For more information, see the documentation on cookie consent API.
defaultAudioStream: In multi stream videos, defines which is the default audio stream, in case one is not explicitly defined in the video manifest.
defaultLanguage: Defines a default language to use, if the browser language does not match any of the dictionary languages.
defaultLayout: Indicates the default layout for videos. This is where you set the content value. For more information, see the documentation on video layouts.
defaultVideoPreview and defaultVideoPreviewPortrait: Indicates the preview image in landscape or portrait mode, respectively. Both attributes are paths to images, relative to the location of the configuration file. Whenever one of these two images is specified, the preview attribute of the video manifest becomes optional.
fallbackId: Specifies a default video identifier to be used in case one is not specified. For more information see the initialization documentation.
logLevel: Allows you to set the default logging level. For more information see the documentation on the logging API. Note that the correct way to debug errors using the logger is to use the logLevel URL parameter.
repositoryUrl: Sets the URL of the manifest file repository for the videos. This attribute is related to manifestFileName.
manifestFileName: Set the filename of the video manifest that paella-core will attempt to load. By default, if the predefined manifest search functions are not modified, the path to the manifest files will be defined by the repositoryUrl attribute, followed by the video identifier and the manifest file name. For example, if repositoryUrl is "videos", the video identifier is "video_0" and manifestFileName is "data.json", the path paella-core will search for is "videos/video_0/data.json". To modify the manifest file resolution method, see the documentation on paella-core initialization.
ui: General configuration options for the user interface:
hideUITimer: Sets the time for hiding the playback bar. The time elapses from the moment the user stops moving the mouse over the player. Note that there are exceptions that cause the playback bar not to be hidden, for example, when the mouse cursor is over the playback bar.hideOnMouseLeave: If true, the user interface is hidden when the mouse leave the player container. This action has the same restrictions as thehideUITimer, for example, the user interface will not be hidden when a pop up is open.
progressIndicator: This attribute is not longer used. The progress indicator settings are now defined using CSS styles. Check the documentation about styling and CSS variables for more information.
preferences: Manages the paella-core user preference system. User preferences can be managed via a specific API that can be used by plugins and certain parts of the library. These settings allow you to set where these preferences will be stored. For more information, see the user preferences API documentation.
sources: Stores the configuration of each data source for the preferences. The keys are the name of the data source, and the value are the settings for that data source.cookie: Preference settings for using cookies as a data source.consentType: This is the type of cookie that will be used to store preferences via the cookie consent API.
dataPlugin: Preferences for using data plugins as data source for preferences. For more information, see the documentation on data plugins.context: Data context for use with data plugins.
currentSource: Sets the data source for storing preferences. The possible values of this attribute are the keys defined in thesourcesobject.
videoContainer: Sets the configuration options related to the video container.
multiStreamMaxDesyncTime: Maximum multi stream video desynchronization time, measured in seconds. If two multi stream videos have acurrentTimedifference greater than this value,paella-corewill try to synchronize them by executing ansetCurrentTime()on the unsynchronized videos. The main video against which the synchronization is measured is the one marked with themainAudiotag. If the value is too low, problems with cuts or interruptions may occur. The default value is 0.2. If there are lag or freeze issues with videos that have more than one stream, try increasing the maximum desynchronization time of the videos.overPlaybackBar: Iftrue, the video container will be placed above the playbar. In other words, the playbar will have an area reserved for its display, so it will never hide the video container. Iffalse, the playbar will be superimposed on the video container.restorePlaybackRate: If true, user settings for playback speed will be stored in the preferences.restoreVolume: If true, user settings for volume will be stored in the preferences.restoreVideoLayout: saves the settings on video layout restoration.enabled: Iftrue, the last video layout selected by the user will be restored, if available.global: Sets whether the video layout restoration settings are video specific or global. Iftrue, the setting is global, so the video layout will be restored for all videos. Iffalsethe layout will only be restored for the video ID on which the user has changed the layout.
restoreLastTime: Sets whether to remember the last known time instant for a particular video, in case it is reloaded.enabled: Iftrue, the last known time instant for the video will be remembered.remainingSeconds: Used to prevent the current instant of time from being restored, whenever there are less thanremainingSecondsseconds left in the video.
dynamicLayout: Dynamic layouts inherit many properties from the video container, so a section has been added in the configuration to control them.landscapeVerticalAlignment: defines the vertical alignment of videos when they are in landscape format. Possible values arealign-bottom,align-centerandalign-top.portraitHorizontalAlignment: defines the horizontal alignment of videos when they are in portrait format. Possible values arealign-left,align-centerandalign-right.
Plugins
Section titled “Plugins”The plugins attribute is an object where each key corresponds to the unique identifier of a plugin, and its value is an object with the configuration of that plugin. For example:
{ ... "plugins": { "es.upv.paella.playPauseButton": { "enabled": true, "order": 1, ... other settings } }}The common attributes for all plugins are:
enabled: By default plugins are disabled. For a plugin to load, this option must be added to true.
order: Indicates the order in which the plugin will be loaded within that plugin type. The order is incremental. If there are two plugins with the same order and they are of the same type, the order in which they will be loaded is not defined, so this situation should be avoided.
There are many other configuration options specific to each plugin type. For all of them, please refer to the documentation for the specific plugin type.