DemoGetPrivateDrmPlayAuth.php 1009 B

123456789101112131415161718192021222324252627282930
  1. // Code generated by protoc-gen-volcengine-sdk
  2. // source: getPrivateDrmPlayAuth
  3. // DO NOT EDIT!
  4. <?php
  5. require('../../vendor/autoload.php');
  6. $client = Volc\Service\Vod\Vod::getInstance();
  7. $client->setAccessKey('your ak');
  8. $client->setSecretKey('your sk');
  9. $request = new Volc\Service\Vod\Models\Request\VodGetPrivateDrmPlayAuthRequest();
  10. $request->setDrmType("your DrmType");
  11. $request->setVid("your Vid");
  12. $request->setPlayAuthIds("your PlayAuthIds");
  13. $request->setUnionInfo("your UnionInfo");
  14. $response = new Volc\Service\Vod\Models\Response\VodGetPrivateDrmPlayAuthResponse();
  15. try {
  16. $response = $client->getPrivateDrmPlayAuth($request);
  17. } catch (Exception $e) {
  18. echo $e, "\n";
  19. } catch (Throwable $e) {
  20. echo $e, "\n";
  21. }
  22. if ($response != null && $response->getResponseMetadata() != null && $response->getResponseMetadata()->getError() != null) {
  23. echo $response->getResponseMetadata()->getError()->serializeToJsonString(), "\n";
  24. } else {
  25. echo $response->serializeToJsonString(), "\n";
  26. }