dharma/laravel-video-uploader
最新稳定版本:v2.0.0
Composer 安装命令:
composer require dharma/laravel-video-uploader
包简介
Laravel package to handle large video uploads with adaptive streaming (HLS) and progress tracking
README 文档
README
A simple and elegant Laravel package to handle video uploads effortlessly. Supports single or multiple video uploads with optional validation and storage support. Perfect for modern Laravel applications.
🌟 Features
- Upload single or multiple videos
- Supports popular video formats (
mp4,mov,avi, etc.) - Optional size/type validation
- Compatible with Laravel 10+
- Easy integration with custom storage disks
- Lightweight and developer-friendly
⚙️ Dependencies
Before using dharma/laravel-video-uploader, install:
- pbmedia/laravel-ffmpeg – handles video processing.
composer require pbmedia/laravel-ffmpeg:^8.7
⚡ Installation
Install via Composer:
composer require dharma/laravel-video-uploader
Publish the config file:
php artisan vendor:publish --provider="Dharma\VideoUploader\VideoUploaderServiceProvider" --tag=config
🚀 Usage Examples
use Dharma\VideoUploader\VideoUploader; class VideoController extends Controller { protected VideoUploader $video; public function __construct(VideoUploader $video) { $this->video = $video; } /** * List all videos */ public function index() { // List videos with pagination (20 per page) $videos = $this->video->list([], 20); return view('video', compact('videos')); } /** * Upload a new video */ public function store(Request $request) { // Upload video and dispatch processing job $video = $this->video->uploadVideo($request->file('video')); return response()->json([ 'message' => 'Video uploaded and queued for processing.!', 'video' => $video ]); } /** * Show single video */ public function show(int $id) { $video = $this->video->getById($id); return view('video', compact('video')); } /** * Delete a video by ID */ public function destroy(int $id) { $this->video->deleteById($id); return response()->json([ 'message' => 'Video deleted successfully.!' ]); } }
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-23