Media Preview

<sw-media-preview>

ready
The sw-media-preview component is used to show a preview of media objects.

Usage

<sw-media-preview :item="item" :showControls="true" :autoplay="false" :useThumbnails="false">
</sw-media-preview>

Component properties

Property name Type Default
source
showControls Boolean false
autoplay Boolean false
transparency Boolean true
useThumbnails Boolean true
hideTooltip Boolean true
mediaIsPrivate Boolean false

Methods

Method name Parameters
createdComponent No parameters
mountedComponent No parameters
fetchSourceIfNecessary No parameters
onPlayClick originalDomEvent
getDataUrlFromFile No parameters
removeUrlPreview No parameters
showEvent No parameters

Imports

  • ./sw-media-preview.html.twig
  • ./sw-media-preview.scss

Watcher

  • source

SASS variables

Variable name Value
$sw-media-preview-play-button-size 50%
$sw-media-preview-play-button-z-index 5
$sw-media-preview-locked-icon-z-index 5

Twig blocks

  • sw_media_preview_no_media_icon
  • sw_media_preview_no_media
  • sw_media_preview_file_type_image
  • sw_media_preview_file_type_video
  • sw_media_preview_file_type_audio
  • sw_media_preview_file_type_placeholder
  • sw_media_preview_file_type_check
  • sw_media_preview_file_types
  • sw_media_preview