Skip to content

阿里云直播API,使用guzzleHttp 中间件方式实现,单文件

License

Notifications You must be signed in to change notification settings

aliyunapi/php-aliyun-open-api-live

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-aliyun-open-api-live

Build Status Latest Stable Version Total Downloads

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist aliyunapi/php-aliyun-open-api-live

or add

"aliyunapi/php-aliyun-open-api-live": "~1.0"

to the require section of your composer.json.

使用方式

$live = new \aliyun\live\Client([
    'accessKeyId' => '123456',
    'accessSecret' => '123456'
    'appName' => 'live',
    'domain' => 'live.cctv.com',
    'pushAuth' => '1234567',
]);

//发送接口请求
$package = [
    'Action' => 'DescribeLiveStreamsPublishList',
    'DomainName' => 'live.cctv.com',
    'StartTime' => gmdate('Y-m-d\TH:i:s\Z', strtotime('2017-03-15')),
    'EndTime' => gmdate('Y-m-d\TH:i:s\Z', strtotime('2017-04-01')),
];
$response = $live->createRequest($package);
print_r($response);
//非请求接口
生成推流地址
$live->getPushPath();
$live->getPushArg($uuid);

//获取播放地址
$live->getPlayUrls($uuid);

exit;

About

阿里云直播API,使用guzzleHttp 中间件方式实现,单文件

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages