承接 ynmstudio/craft-video-dimensions-universal 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ynmstudio/craft-video-dimensions-universal

最新稳定版本:1.0.2

Composer 安装命令:

composer require ynmstudio/craft-video-dimensions-universal

包简介

A Craft CMS plugin that automatically extracts and saves video dimensions after upload.

README 文档

README

This plugin automatically extracts and saves video dimensions after uploading video files in Craft CMS. It supports both local files and files hosted on S3 or other remote filesystems.

Requirements

  • Craft CMS 5.0.0 or later
  • PHP 8.0.2 or later

Installation

You can install this plugin from the Plugin Store or with Composer.

From the Plugin Store

Go to the Plugin Store in your project's Control Panel and search for "Video Dimensions Universal". Then click "Install".

With Composer

cd /path/to/your-project
composer require ynmstudio/craft-video-dimensions-universal
./craft plugin/install video-dimensions-universal

Features

  • Automatically extracts video dimensions upon upload
  • Supports both local and remote files (e.g., S3)
  • Works with any filesystem extending the craft\base\Fs class
  • Updates asset records with correct width and height
  • Handles errors gracefully with proper logging
  • Cleans up temporary files

Usage

After installation, simply upload a video file through the Craft CMS control panel. The plugin will:

  1. Detect that the uploaded file is a video
  2. Extract its dimensions
  3. Save the dimensions to the asset record

You can access the dimensions in your templates the same way as it would be a image asset:

{% set video = entry.videoField.one() %}
{% if video %}
    Width: {{ video.width }}
    Height: {{ video.height }}
{% endif %}

Support

If you encounter any issues or have questions, please create an issue on GitHub:
https://github.com/ynmstudio/craft-video-dimensions-universal/issues

License

Copyright © Yil & Mann GbR

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2025-07-15