承接 elfarmawy/vdocipher 相关项目开发

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

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

elfarmawy/vdocipher

最新稳定版本:1.1.0

Composer 安装命令:

composer require elfarmawy/vdocipher

包简介

Laravel package for VdoCipher video platform integration

README 文档

README

Latest Version on Packagist Total Downloads GitHub Tests Action Status

A Laravel package that provides a clean, API-only integration with the VdoCipher video platform. Supports Laravel 10, 11, and 12.

Installation

You can install the package via Composer:

composer require ElFarmawy/vdocipher

Publishing the config file

php artisan vendor:publish --provider="ElFarmawy\VdoCipher\Providers\VdoCipherServiceProvider" --tag=config

This will create a config/vdocipher.php configuration file in your app where you can modify the settings.

Configuration

Update your .env file with your VdoCipher API key:

VDOCIPHER_API_KEY=your-api-key
VDOCIPHER_BASE_URL=https://dev.vdocipher.com/api
VDOCIPHER_OTP_TTL=300

You can also configure default watermarks in the config/vdocipher.php file:

'watermarks' => [
    [
        'type'     => 'rtext',
        'text'     => 'Copyright © ' . date('Y'),
        'alpha'    => '0.6',
        'color'    => '0xFFFFFF',
        'size'     => '15',
        'interval' => '5000',
    ],
],

Usage

Basic Example

use ElFarmawy\VdoCipher\Facades\VdoCipher;

// Get OTP for video playback
$otpInfo = VdoCipher::getOtp('video_id', [
    'userId' => 42,
]);

// Get complete video details including OTP
$details = VdoCipher::getVideoDetails('video_id', [
    'userId' => 42,
]);

// List all videos
$videos = VdoCipher::getVideos([
    'page' => 1,
    'limit' => 10,
]);

Overriding Default Configuration at Runtime

You can override the default configuration at runtime:

// Override API key
VdoCipher::setApiKey('new-api-key');

// Override base URL
VdoCipher::setBaseUrl('https://custom-dev.vdocipher.com/api');

// Override default watermarks
VdoCipher::setWatermarks([
    [
        'type'     => 'rtext',
        'text'     => 'MyCustomText',
        'alpha'    => '0.2',
        'color'    => '0x00FF00',
        'size'     => '40',
        'interval' => '100000',
    ],
]);

Managing Videos

// Get a specific video
$video = VdoCipher::getVideo('video_id');

// Delete a video
$deleted = VdoCipher::deleteVideo('video_id');

Video Upload

// Get upload credentials
$credentials = VdoCipher::getVideoCredentials('My Video Title', '7d52*******'); // folderId Optional

// Upload a video file
$uploadLink = $credentials['clientPayload']['uploadLink'];
$formData = $credentials['clientPayload'];
$file = $request->file('video');

// Added custom redirect if needed
// $formData['success_action_status'] = 201;
// $formData['success_action_redirect'] = '';

$uploadResult = VdoCipher::uploadVideoToApi($uploadLink, $formData, $file);

Full Documentation

For complete documentation and advanced usage, please check the Wiki.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email tarekelfarmawy@outlook.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固