PHPackages                             githen/laravel-tencent-vod - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. githen/laravel-tencent-vod

ActiveLibrary

githen/laravel-tencent-vod
==========================

基于laravel的腾讯点播上传

v2.0.0(7mo ago)2262↓100%MITPHP

Since May 8Pushed 7mo ago2 watchersCompare

[ Source](https://github.com/jiaoyu-cn/laravel-tencent-vod)[ Packagist](https://packagist.org/packages/githen/laravel-tencent-vod)[ RSS](/packages/githen-laravel-tencent-vod/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (12)Used By (0)

laravel-TencentVod
==================

[](#laravel-tencentvod)

基于laravel的腾讯点播上传

[![image](https://camo.githubusercontent.com/b4d07ea4b10b7cbc85b67251e8fbc2c4c0306ae2770d88c4ad4a17fad9f601a0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6a69616f79752d636e2f6c61726176656c2d74656e63656e742d766f64)](https://github.com/jiaoyu-cn/laravel-tencent-vod/stargazers)[![image](https://camo.githubusercontent.com/5ba6dc3cff09d2b0305b42a0821c6e245db43ac985d84a50a4d6cf8ba8e527fb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6a69616f79752d636e2f6c61726176656c2d74656e63656e742d766f64)](https://github.com/jiaoyu-cn/laravel-tencent-vod/network/members)[![image](https://camo.githubusercontent.com/ce2151fd4e25ec2a63eda51fd0aa4dae4852aee9f3c1c7b0fef2361952e1250b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6a69616f79752d636e2f6c61726176656c2d74656e63656e742d766f64)](https://github.com/jiaoyu-cn/laravel-tencent-vod/issues)

安装
--

[](#安装)

```
composer require githen/laravel-tencent-vod:~v2.0.0

# 迁移配置文件
php artisan vendor:publish --provider="Githen\LaravelTencentVod\VodProvider"
```

配置文件说明
------

[](#配置文件说明)

生成`vod.php`上传配置文件

```
return [
    /**
     *  'secret_id' =>  // API密钥SecretId
     * 'secret_key' =>  // API密钥SecretKey
     * |--------------------------------------------------------------------------
     * | 视频上传配置
     * |--------------------------------------------------------------------------
     * |  '标识' => [
     *      'sub_appid' => , //点播应用的SubAppId
     *      'class_id' => , //点播应用的分类ID
     *       'procedure_name' =>  // 任务流名称
     * ]
     */
return [
    'secret_id' => '***',
    'secret_key' => '***',
    'vod' => [
        'global' => [
            'signature_url' => true, // 注册路由，生成签名  请求地址：/jiaoyu/tencent/vod/sign/{标识}
            'auth' => ['auth'], // 路由中间件
            'size' => 50, // MB
            'ext' => [".mp4"],
        ],
        'sub_appid' => env('TENCENT_VOD_SUB_APPID', 0),
        'class_id' => env('CLASS_ID', 0),
        'procedure_name' => ''
    ],
];

];
```

初始化视频上传实例
---------

[](#初始化视频上传实例)

在`html`中引入`JS`文件

```

```

实例化上传类

```
myVideo = new Vodupload({
        dom:"#upload_file_input",
        // signature:"vod",
        config:'vod',
        signature:function (){return "{{$sign}}"},
        maxFilesize:{!! config('vod.global.size') !!},
        acceptedFiles:"{!! implode(',', config('vod.global.ext')) !!}",
        replace:false, // 当限制为1个时，是否直接替换
        progressInterval:100,
        cacheTime:600,
        callback:function (type, name, info) {
            // info  每种事件传递的数据信息

            // 回调会有五个事件
            // type:media name:upload    视频上传完成
            // type:media name:progress  视频上传进度
            // type:cover name:upload    封面图上传完成
            // type:cover name:progress  封面图上传进度
            // type:done name:done       获取视频在腾讯端的基本信息

        }
    });
```

参数名称说明备注dom上传文件对应的&lt;input type=file&gt;标识必填config配置文件中的标识必填signature获取上传签名的方法非必填，默认请求：jiaoyu/tencent/vod/sign/{config}maxFilesize文件大小MBacceptedFiles允许上传文件后缀(.jpg,.png)默认为.mp4chunkSize分片大小单位：MB,默认2MBmaxFiles最多上传文件数非必填，默认：1progressInterval进程回调间隔非必填，默认：200msreplaceMaxFiles为1时，是否直接替换cover上传的封面图 File资源对象非必填expireTime视频临时存放时长非必填,默认：7200 单位：秒直接存放，值设为 undefined回调参数说明

typeaction说明mediaprogress媒体文件上传进度mediaupload媒体文件上传成功时coverprogress封面文件上传进度coverupload封面上传成功时donedone媒体文件上传结果fileserror上传报错filesremove超过视频限制数量自动注入的`路由`
---------

[](#自动注入的路由)

请求方法请求地址参数说明备注GETjiaoyu/tencent/vod/sign/{param}param(string)：使用的配置中的标识获取上传签名GETjiaoyu/tencent/vod/modify/{param}param(string)：使用的配置中的标识
FileId：腾讯视频ID
ExpireTime：到期时间戳修改视频的时长错误码

错误码说明备注1001签名请求报错1002修改视频时长报错支持方法
----

[](#支持方法)

已封装的`Provider`提供的方法，

```
// 注入服务的单例 app('jiaoyu.tencent.vod')
// ModifyMediaInfo 支持方法
app('jiaoyu.tencent.vod')->ModifyMediaInfo($label, $request->all());
```

### 调用方法 ModifyMediaInfo($label, $params = \[\])

[](#调用方法-modifymediainfolabel-params--)

修改视频基本信息

- $label：配置标识
- $params: 请求参数

参数类型说明FileId必填：String媒体文件唯一标识。NameString媒体文件名称，最长 64 个字符。DescriptionString媒体文件描述，最长 128 个字符。ExpireTimeString媒体文件过期时间，采用 ISO 日期格式。填“9999-12-31T23:59:59Z”表示永不过期。CoverDataString视频封面图片文件（如 jpeg, png 等）进行 Base64 编码后的字符串，仅支持 gif、jpeg、png 三种图片格式。### 调用方法 getSignature($label)

[](#调用方法-getsignaturelabel)

获取上传签名

- $label：配置标识

### 调用方法 ProcessMediaByProcedure($label, $params = \[\])

[](#调用方法-processmediabyprocedurelabel-params--)

对视频执行转码

- $label：配置标识
- $params: 请求参数

参数类型说明FileId必填：String媒体文件唯一标识。ProcedureName必填：String任务流模板名字。TasksPriorityInteger任务流的优先级，数值越大优先级越高，取值范围是-10到10，不填代表0。TasksNotifyModeString任务流状态变更通知模式，可取值有 Finish，Change 和 None，不填代表 Finish。SessionContextString来源上下文，用于透传用户请求信息，任务流状态变更回调将返回该字段值，最长 1000 个字符。SessionIdString用于去重的识别码，如果三天内曾有过相同的识别码的请求，则本次的请求会返回错误。最长 50 个字符，不带或者带空字符串表示不做去重。### 调用方法 DescribeTaskDetail($label, $params = \[\])

[](#调用方法-describetaskdetaillabel-params--)

获取任务详情

- $label：配置标识
- $params: 请求参数

参数类型说明TaskId必填：String任务ID#### 调用方法 send($label, $action, $params = \[\])

[](#调用方法-sendlabel-action-params--)

发送请求

- $label：配置标识
- $action：腾讯云端的方法
- $params: 请求参数，具体参考要请求的`$action`的腾讯文档

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance62

Regular maintenance activity

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~86 days

Recently: every ~216 days

Total

11

Last Release

232d ago

Major Versions

v1.0.9 → v2.0.02025-09-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/51a06d2f182ca37da5fc95e1fa8988248962856bc62e65dc0a5fbb420af3e9af?d=identicon)[githen](/maintainers/githen)

---

Top Contributors

[![githen-cn](https://avatars.githubusercontent.com/u/3197947?v=4)](https://github.com/githen-cn "githen-cn (13 commits)")[![nanjishidu](https://avatars.githubusercontent.com/u/15984590?v=4)](https://github.com/nanjishidu "nanjishidu (4 commits)")

### Embed Badge

![Health badge](/badges/githen-laravel-tencent-vod/health.svg)

```
[![Health](https://phpackages.com/badges/githen-laravel-tencent-vod/health.svg)](https://phpackages.com/packages/githen-laravel-tencent-vod)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
