sitegeist/media-components
最新稳定版本:0.2.1
Composer 安装命令:
composer require sitegeist/media-components
包简介
Ready-to-use fluid components for embedding different media files
关键字:
README 文档
README
This extension is still in development and might not ready for production usage.
This extension provides ready-to-use Fluid Components for various media assets:
- Images
- Audio files
- Video files
WebP conversion
As these components are such basic atoms, you could use them to change the format of any image to WebP to reduce file sizes. The extension configuration contains a list of file extensions that will be converted to WebP if not explicitly defined with format=.
You colud use autoWebpConversionFormats with gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai to get full conversion to WebP (without svg as it already has a smaller file size).
Usage
We use the public namespace from fluid-components.
Images
<fc:image src="{width:200, height:100}" /> <fc:image src="5" width="500" height="100" maxDimensions="true" cropVariant="Default" srcset="400w, 800w, 1200w" sizes="(min-width: 400px) 400px, (min-width: 800px) 800px, (min-width:1200px) 1200px, 100vw" format="jpg" alt="Alt text" title="Title text" lazyload="true" preload="true" />
Pictures
<fc:picture src="{originalImage: {fileUid: 5}, srcset: \'400,800,1200\'}" sources="{desktop: {originalImage: {fileUid: 5}, srcset: \'1000, 1200, 1400, 1600, 1800, 2000\'}}" width="500" height="100" maxDimensions="true" alt="Alt text" title="Title text" lazyload="true" preload="true" />
Video
<fc:video sources="{0: 7}" tracks="{0: 8}" width="800" height="600" autoplay="false" controls="true" loop="true" muted="false" poster="{fileUid: 4}" preload="metadata" fallbackText="Fallback" crossorigin="anonymous" playsinline="true" />
Audio
<fc:audio sources="{0: 1, 1: 2, 3: 2}" autoplay="true" controls="true" loop="true" muted="true" preload="metadata" fallbackText="Fallback" crossorigin="anonymous" />
统计信息
- 总下载量: 2.49k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2024-10-11