No Description

rtc_rooms_stopMerge.php 692B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. require_once __DIR__ . '/../../autoload.php';
  3. use Qiniu\Auth;
  4. use Qiniu\Rtc\AppClient;
  5. // 控制台获取密钥:https://portal.qiniu.com/user/key
  6. $accessKey = getenv('QINIU_ACCESS_KEY');
  7. $secretKey = getenv('QINIU_SECRET_KEY');
  8. $auth = new Auth($accessKey, $secretKey);
  9. $client = new AppClient($auth);
  10. // app 的唯一标识,创建的时候由系统生成
  11. $appId = 'xxxx';
  12. // 房间名称
  13. $roomName = 'room01';
  14. // 停止一个房间的合流转推
  15. // 参考文档:https://doc.qnsdk.com/rtn/docs/server_overview#2_2
  16. list($ret, $err) = $client->stopMerge($appId, $roomName);
  17. if ($err !== null) {
  18. var_dump($err);
  19. } else {
  20. echo "\n====> Stop Merge Successfully \n";
  21. }