Namespace: viewer

viewer

A super module that collects media viewer related sub-modules.
Source:

Methods

(static) createLightboxImage(src, width, height, srcSetopt) → {Element}

Display an image with lightbox support on a website.
Parameters:
Name Type Attributes Description
src string Image URL.
width number Image width in pixel (ignores exif orientation, thus width > height for landscape).
height number Image height in pixel (ignores exif orientation, thus width < height for portrait).
srcSet string <optional>
Image srcset attribute with width descriptor.
Source:
Returns:
Image container.
Type
Element

(static) getHTMLOfIFDOIcon(iFDOKey, iFDOValue) → {string}

For an iFDO key, return its HTML element containing the iFDO icon font class name. Note: Requires the iFDO-icons stylesheet.
Parameters:
Name Type Description
iFDOKey string
iFDOValue string
Source:
Returns:
HTML element with iFDO icon class.
Type
string

(static) guessIFDOKey(iFDOSimilarKey) → {string}

Try to match the input argument to a set of iFDO keys. Check if part of the given argument is contained in a list of known iFDO keys, and return the corresponding iFDO key. Example: Returns 'image-acquisition' for iFDOSimilarKey = 'acquisition' or iFDOSimilarKey = 'iFDO-acquisition'
Parameters:
Name Type Description
iFDOSimilarKey string Key that is almost similar to iFDO key.
Source:
Returns:
iFDO key.
Type
string

(static) initVideo(config, container) → {HTMLElement}

Internal function to create a container for the player. The player will be initialized when it was added to the dom.
Parameters:
Name Type Description
config object
container HTMLElement
Source:
Returns:
- Video player inside a container.
Type
HTMLElement