You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
526 B
26 lines
526 B
<?php
|
|
require('../../vendor/autoload.php');
|
|
|
|
use Volc\Service\Vod\Models\Request\VodGetSubtitleInfoListRequest;
|
|
use Volc\Service\Vod\Vod;
|
|
|
|
$client = Vod::getInstance();
|
|
// call below method if you dont set ak and sk in ~/.vcloud/config
|
|
// $client->setAccessKey("");
|
|
// $client->setSecretKey("");
|
|
|
|
$vid = "vid";
|
|
|
|
echo "\n获取字幕token\n";
|
|
|
|
$req = new VodGetSubtitleInfoListRequest();
|
|
|
|
$req->setVid($vid);
|
|
|
|
try {
|
|
$token = $client->getSubtitleAuthToken($req, 60);
|
|
} catch (Throwable $e) {
|
|
print($e);
|
|
}
|
|
|
|
echo $token; |