12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- require dirname(__FILE__, 2) . '/vendor/autoload.php';
- $secretId = "SECRETID";
- $secretKey = "SECRETKEY";
- $region = "ap-beijing";
- $cosClient = new Qcloud\Cos\Client(
- array(
- 'region' => $region,
- 'scheme' => 'https',
- 'credentials'=> array(
- 'secretId' => $secretId,
- 'secretKey' => $secretKey)));
- try {
- $result = $cosClient->detectLiveVideo(array(
- 'Bucket' => 'examplebucket-125000000',
- 'Type' => 'live_video',
- 'Input' => array(
- 'Url' => 'rtmp://example.com/live/123',
- ),
- 'Conf' => array(
- 'Callback' => '',
- 'BizType' => '07d41bbb5a3a93dca4xxxxxxxxxxx',
- ),
- 'StorageConf' => array(
- 'Path' => 'xxx',
- ),
- ));
-
- print_r($result);
- } catch (\Exception $e) {
-
- echo($e);
- }
|