PHPackages                             shaozeming/aliyun-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. [API Development](/categories/api)
4. /
5. shaozeming/aliyun-vod

ActiveLibrary[API Development](/categories/api)

shaozeming/aliyun-vod
=====================

基于阿里云点播系统最新版本的SDKcomposer package

v2.0.0(7y ago)116282MITPHP

Since Mar 6Pushed 7y ago1 watchersCompare

[ Source](https://github.com/ShaoZeMing/Aliyun-Vod)[ Packagist](https://packagist.org/packages/shaozeming/aliyun-vod)[ RSS](/packages/shaozeming-aliyun-vod/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (6)Used By (0)

Aliyun Vod for PHP
==================

[](#aliyun-vod-for-php)

---

[![](https://camo.githubusercontent.com/92f6ef07ecebbf942c01195c53e459cdbaf44783a88d0982fed02db70cb1d5f1/68747470733a2f2f7472617669732d63692e6f72672f5368616f5a654d696e672f416c6979756e2d566f642e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ShaoZeMing/Aliyun-Vod)[![](https://camo.githubusercontent.com/354ef13fff95830ceb67227cd7963817c3c8373e273c025d202a1352f4c4b725/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f5368616f5a654d696e672f616c6979756e2d766f642e737667)](https://packagist.org/packages/shaozeming/aliyun-vod)[![](https://camo.githubusercontent.com/9ce5a51e8ad4b6107eea81de8db59a115a0671c451f1df93d21f94de2cd1804d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f5368616f5a654d696e672f616c6979756e2d766f642e737667)](https://packagist.org/packages/stichoza/shaozeming/aliyun-vod)

> 因为项目驱动，目前只自定义了几个简单的方法，用于视频查询鉴权和视频上传系列接口，比较其他很多功能接口，我个人觉得直接去控制台更好管理。如果你执意要用，那我只能说你很棒棒哦，需要vod其他的api方法调用，可以参考官方SDK文档使用本包进行调用，本包包含官方所有接口文件，composer已自动载入官方SDK,可以参考。Service/下几个文件。

同胞兄弟
----

[](#同胞兄弟)

- [ShaoZeMing/aliyun-vod](https://github.com/ShaoZeMing/Aliyun-Vod)
- [ShaoZeMing/aliyun-sts](https://github.com/ShaoZeMing/Aliyun-Sts)
- [ShaoZeMing/aliyun-core](https://github.com/ShaoZeMing/Aliyun-Core)
- [ShaoZeMing/aliyun-oss](https://github.com/ShaoZeMing/Aliyun-Oss)
- 待续...

Installing
----------

[](#installing)

```
$ composer require shaozeming/aliyun-vod -v
```

### configuration

[](#configuration)

拷贝项目下`src/config.php`到你项目中，进行配置其中vod。

配置示例代码：

```
return [

    /*点播配置*/
    'vod' => [
        'AccessKeyID' => '******密码不能给你看******',
        'AccessKeySecret' => '******密码不能给你看******',
        'regionId' => 'cn-shanghai',   // 点播服务接入区域
        'timeout' => '3600',  // 如果是获取签名有效时间为多少
        'type' => 'access',  //类型:access|sts 如果是sts 实例化对象时候需要传入$securityToken
        'acceptFormat' => 'JSON',  //返回数据格式
    ],
];
```

Example
-------

[](#example)

- 拷贝项目下`src/config.php`到你项目中，进行配置。

```
use ShaoZeMing\AliVod\Services\ReadService;
use ShaoZeMing\AliVod\Services\UploadService;

             $config = include 'you_path/config.php';

             $instance = new UploadService($config);

//            $title ='title';
//            $filename= 'filename.mp4';
//            $desc = "这是一个测试视频";
//            $coverUrl='http://www.pptbz.com/pptpic/UploadFiles_6909/201203/2012031220134655.jpg';
//            $tags=['标签1','标签2'];
//            $result =  $instance->createUploadVideo($title,$filename,$desc,$coverUrl, $tags);  //获取视频上传地址和凭证
//            $result =  $instance->refreshUploadVideo($videoId);  //刷新视频上传凭证
//            $result = $instance->uploadMediaByURL($url,$title);  //url 拉去视屏上传

              $read = new ReadService($config);
              $result =  $read->getPlayAuth('4db8b50cbee04154b9557a4812a27584'); // 获取播放权限参数
//            $result =  $read->getPlayInfo('4db8b50cbee04154b9557a4812a27584'); // 获取播放信息

            print_r($result);
            return $result;

```

使用原生官方sdk接口示例
-------------

[](#使用原生官方sdk接口示例)

- 目前只重写了几个接口方便使用，官方这个很多接口没有写，你们要使用可以直接使用原生方法。

```
use ShaoZeMing\AliVod\SDK\GetPlayInfoRequest;

    /**
     * 获取视频播放详细信息
     * User: ZeMing Shao
     * Email: szm19920426@gmail.com
     * @param $videoId
     * @param float|int $timeout
     * @return mixed|\ShaoZeMing\Aliyun\Core\SimpleXMLElement
     * @throws \ShaoZeMing\Aliyun\Core\Exception\ClientException
     * @throws \ShaoZeMing\Aliyun\Core\Exception\ServerException
     */
    function getPlayInfo($videoId, $timeout = 3600 * 24)
    {
        $request = new GetPlayInfoRequest();
        $request->setVideoId($videoId);
        $request->setAuthTimeout($timeout);
        $request->setAcceptFormat('JSON');
        $playInfo = $this->client->getAcsResponse($request);
        return $playInfo;
    }
```

License
-------

[](#license)

MIT

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~1 days

Total

5

Last Release

2621d ago

Major Versions

v1.0.3 → v2.0.02019-03-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/27b8938a70163fe95a1bea9ead4bfa7386b3fef2e00dd6c55bc1b3a20351fc72?d=identicon)[ShaoZeMing](/maintainers/ShaoZeMing)

---

Top Contributors

[![ShaoZeMing](https://avatars.githubusercontent.com/u/19376576?v=4)](https://github.com/ShaoZeMing "ShaoZeMing (21 commits)")

---

Tags

aliyun-apialiyun-sdkaliyun-vodcomposervod

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/shaozeming-aliyun-vod/health.svg)

```
[![Health](https://phpackages.com/badges/shaozeming-aliyun-vod/health.svg)](https://phpackages.com/packages/shaozeming-aliyun-vod)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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