escape/escapedam
最新稳定版本:3.2.1
Composer 安装命令:
composer require escape/escapedam
包简介
Escape DAM integration
README 文档
README
Escape DAM integration
Using Escape DAM
Enable videos
To enable selecting videos from the DAM, the "Video" file kind must be checked under the DAM field's "Restrict allowed file types?" setting.
DAM field asset properties and methods
The plugin adds the following extra methods to assets:
isDamFile bool (true if the asset was imported from the DAM)
isDamImage bool (true if the asset was imported from the DAM, and is an image)
isDamVideo bool (true) if the asset was imported from the DAM, and is a video)
getMuxPlaybackId() string|null Returns the Mux playback ID if the asset is an imported video; null if not.
getDamVideoStreamUrl() string|null Returns the Mux URL to the HLS stream, if the asset is an imported video; null if not.
getDamVideoData() array|null Returns all the DAM data for an imported video asset; null if the asset is not a DAM video.
getDamVideoTag($params=[], $polyfill=true) string|null Returns a video tag if the asset is an imported video asset. Example usage:
{% set asset = entry.damField.one() %}
{% if asset and asset.isDamVideo %}
{{ asset.getDamVideoTag({ autoplay: true, muted: true, poster: false })|attr({ class: 'absolute inset-0 w-full h-full object-fit' }) }}
{% endif %}
getDamVideoImageUrl($params=[]) string|null Returns the URL to an image from the video, if the asset is an imported video asset. See https://docs.mux.com/guides/video/get-images-from-a-video#thumbnail-query-string-parameters for possible params.
getDamVideoGifUrl() string|null Returns the URL to an animated GIF from the video, if the asset is an imported video asset. See https://docs.mux.com/guides/video/get-images-from-a-video#animated-gif-query-string-parameters for possible params.
统计信息
- 总下载量: 27
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-04-15