DemoTransPreset.php 964 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. include 'DemoBase.php';
  3. global $client;
  4. $body = [
  5. 'PresetList' => []
  6. ];
  7. $response = $client->listCommonTransPresetDetail(['json' => $body]);
  8. echo $response;
  9. echo '<br>';
  10. $body = [
  11. 'Vhost' => 'vhost',
  12. 'App' => 'app',
  13. 'Status' => 0,
  14. 'SuffixName' => 'xx',
  15. 'Preset' => 'test',
  16. 'FPS' => 30,
  17. ];
  18. $response = $client->createTranscodePreset(['json' => $body]);
  19. echo $response;
  20. echo '<br>';
  21. $body = [
  22. 'Vhost' => 'vhost',
  23. 'App' => 'app',
  24. 'Status' => 0,
  25. 'SuffixName' => 'xx2',
  26. 'Preset' => 'test',
  27. 'FPS' => 60,
  28. ];
  29. $response = $client->updateTranscodePreset(['json' => $body]);
  30. echo $response;
  31. echo '<br>';
  32. $body = [
  33. 'Vhost' => 'vhost',
  34. 'App' => 'app',
  35. 'Preset' => 'test',
  36. ];
  37. $response = $client->deleteTranscodePreset(['json' => $body]);
  38. echo $response;
  39. echo '<br>';
  40. $body = [
  41. 'Vhost' => 'vhost',
  42. ];
  43. $response = $client->listVhostTransCodePreset(['json' => $body]);
  44. echo $response;
  45. echo '<br>';