Download the PHP package ttvcloud/vcloud-sdk-php without Composer

On this page you can find all versions of the php package ttvcloud/vcloud-sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package vcloud-sdk-php

使用方式

composer引用

地域Region设置

AK/SK设置

以上优先级依次降低,建议在代码里显示设置,以便问题排查

API

上传

uploadMediaByUrl

上传视频包括 applyUploadcommitUpload 两步

上传封面图包括 applyUploadmodifyVideoInfo 两步

为方便用户使用,封装方法 uploadVideo 和 uploadPoster, 一步上传

转码

startTranscode

发布

setVideoPublishStatus

播放

getPlayInfo

getOriginVideoPlayInfo

getRedirectPlay

封面图

getPosterUrl

token相关

上传 非STS2 token getUploadAuthToken

上传 STS2 token 参考STS2示例

getPlayAuthToken

PS: 上述两个接口和 getRedirectPlay 接口中均含有 X-Amz-Expires 这个参数

关于这个参数的解释为:设置返回的playAuthToken或uploadToken或follow 302地址的有效期,目前服务端默认该参数为15min(900s),如果用户认为该有效期过长,可以传递该参数来控制过期时间 。

STS2鉴权

点播提供的 API ( default )

getVideoPlayAuth(array $vidList, array $streamTypeList, array $watermarkList)

vidList、streamTypeList、watermarkList 为3种资源,分别代表视频vid、stream type和水印三种资源,数组为空是代表允许访问所有资源。

默认的 action 为 vod::GetPlayInfo(不需手动设置)

默认过期时间为1小时,可以通过如下 API 自定义过期时间

getVideoPlayAuthWithExpiredTime(array $vidList, array $streamTypeList, array $watermarkList, int $expire)

示例代码:

自定义 STS2 授权模式

更多示例参见

example

封面图

1.GetDomainInfo 产品化对外域名调度接口,根据spaceName获取CDN域名(定期获取,本地缓存)

2.getPosterUrl 获取封面图地址

包含四个参数,分别为:

1)space 空间名称

2)图片uri地址

3)降级域名及权重,形如['p1.test.com' => 10, 'p3.test.com' => 5]

4)option参数


All versions of vcloud-sdk-php with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ttvcloud/vcloud-sdk-php contains the following files

Loading the files please wait ....