carbon/videoplatformeditor
Composer 安装命令:
composer require carbon/videoplatformeditor
包简介
Editors to select Youtube, Vimeo content and download thumbnail and metadata
README 文档
README
A Neos CMS plugin that provides editors and infrastructure for managing videos from popular platforms (YouTube and Vimeo), with automatic metadata extraction and thumbnail downloading.
Features
- Multi-platform support: Seamless integration with YouTube and Vimeo
- Inspector Editor: User-friendly UI component for selecting and managing videos in Neos backend
- Automatic Metadata Extraction: Fetches video metadata including title, duration, and aspect ratio
- Thumbnail Management: Automatically downloads and stores video thumbnails as Neos assets
- oEmbed Integration: Uses oEmbed protocol for reliable metadata extraction
- TypeScript Support: Modern frontend development with TypeScript and React
Requirements
- Neos/Neos-UI ~9.1.4
Requirements for for building the plugin
- Node.js 24
- Yarn 3.2.0
Installation
composer require carbon/videoplatformeditor
Project Structure
Backend (PHP)
Core Classes:
Video- Represents a video entity with metadataVideoPlatformType- Enum for platform types (YouTube, Vimeo)YoutubeVideoId/VimeoVideoId- Platform-specific video ID modelsAspectRatio- Video aspect ratio handlingAssetId- Reference to Neos asset resources
Infrastructure:
OembedMetadataProvider- Retrieves metadata via oEmbed protocolYoutubeContentDetailsProvider- YouTube-specific metadata extractionImageImporter- Handles thumbnail asset creationOembedHtmlExtractor- Parses oEmbed HTML responsesAssetUsageExtractionAspect- Tracks asset usage relationships
Controllers:
VideoPlatformController- Backend API endpointsVideoQuery- Query builder for video searches
Frontend (TypeScript/React)
Core Module (Modules/core/):
InspectorEditor- React component for the Neos inspector UIMetadataView- Displays video metadata and previewVideodomain model - TypeScript representation of video data- HTTP client for backend communication
Plugin Module (Modules/plugin/):
- Built with esbuild for production optimization
- Compiled JavaScript and CSS served from
Resources/Public/
Configuration
Settings.Neos.Ui.yaml
Registers the VideoPlatformEditor as the inspector editor for the Video data type:
Neos: Neos: userInterface: inspector: dataTypes: Carbon\VideoPlatformEditor\Video: editor: Carbon.VideoPlatformEditor/Inspector/Editors/VideoPlatformEditor
Settings.Mvc.yaml
Contains MVC-specific configurations for the backend controllers.
Policy.yaml
Defines access control policies for video platform operations.
Usage
PHP Integration
use Carbon\VideoPlatformEditor\Video; use Carbon\VideoPlatformEditor\YoutubeVideoId; $video = new Video( id: YoutubeVideoId::fromString('dQw4w9WgXcQ'), title: 'Video Title', duration: 212, aspectRatio: AspectRatio::SIXTEEN_NINE, thumbnail: null );
Neos NodeType
Define a video property in your NodeType:
'MyPackage:Content.Video': superTypes: 'Neos.Neos:Content': true properties: video: type: 'Carbon\VideoPlatformEditor\Video'
Development
Build Commands
# Type checking yarn lint # Build plugin yarn build
Project Workspaces
This project uses Yarn workspaces:
Modules/core- Core TypeScript domain and utilitiesModules/plugin- Neos UI plugin build
Testing
Unit and functional tests are located in Tests/:
# Run tests
vendor/bin/phpunit Tests/
Test coverage includes:
- Video serialization/deserialization
- oEmbed metadata extraction
- YouTube content details
- Aspect ratio handling
- Asset usage tracking
License
GPL-3.0-or-later
Support
For issues and feature requests, please refer to the repository's issue tracker.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2026-07-01