thinkawitch/janus-php-api

Janus网关的PHP API

v0.0.1 2023-02-10 18:37 UTC

This package is auto-updated.

Last update: 2024-09-12 15:55:16 UTC


README

Janus网关API的简单PHP包装器。

要求

  • PHP 8.1+
  • symfony/http-client 6.1+

安装

composer require thinkawitch/janus-php-api

限制

  • 同步请求 http 只支持,不支持 websockets,不支持 rabbitmq

特性

  • 通用的API调用
  • textroom、videoroom插件的具体调用

基本用法

use Thinkawitch\JanusApi\JanusHttpClient;
$janus = new JanusHttpClient($apiUrl, $apiSecret);
$janus->createSession();
$textRoom = $janus->attachToTextRoomPlugin($textRoomAdminKey);
$rooms = $textRoom->getRooms();
$textRoom->detach();
$janus->destroySession();

示例

更多内容请参阅examples 目录