# BaseMediaCarousel

Component allowing sliding through images, audio, video (currently only hls format) and files

# Props

Prop name Description Type Values Default
items items to display in a swiper carousel

array of objects with the following required properties:
title string - the asset title
mediaUrl string - url of the medium to be displayed

additionally, type video also requires the following properties:
mediaPosterUrl string - url of image for poster property in html5 video tag
displaySize Object - set height and with from outside, needs to be an object with properties height and/or width.

optional properties:
additionalInfo string[] - additional info text below file name, an array of strings.
downloadUrl string - url for downloading the file
mediaType string - specify the media type - needs to be one of: image, video, audio, pdf. Caveat: if media type is not specified it is automatically determined from file ending!
orientation number - define how the image should be rotated (EXIF orientation values) (only for type image)
previews Object[] - specify an image srcset as an array of objects in the form { [mediawidth]: 'url' } (only for type image)
hlsStartLevel number - define startLevel (size) of hls-video
array - []
initialSlide index of initial slide
this NEEDS to be provided if carousel should start with any other
than first image in items array
number|string - 0
allowDownload define if download button should be shown and download be enabled boolean - true
infoTexts define information texts for download and view (for pdfs) buttons object - {
download: 'Download',
view: 'View'
}
showPreview steer the display of the lightbox boolean - false
swiperOptions specify swiper API options (opens new window) object - {
speed: 500,

keyboard: {
enabled: true,
}
}

# Events

Event name Properties Description
hide triggered by clicking on close button
download url string - the download url
name string - the file name
download button clicked

# Demo

Last Updated: 5/17/2023, 3:45:47 PM