PHPackages                             rtippin/janus-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. rtippin/janus-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

rtippin/janus-client
====================

Janus Gateway Client

v1.4.0(1y ago)212.7k61MITPHPPHP ^8.2|^8.3|^8.4CI passing

Since Aug 8Pushed 1y ago2 watchersCompare

[ Source](https://github.com/RTippin/janus-client)[ Packagist](https://packagist.org/packages/rtippin/janus-client)[ Docs](https://github.com/rtippin/janus-client)[ GitHub Sponsors](https://github.com/RTippin)[ RSS](/packages/rtippin-janus-client/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (6)Dependencies (4)Versions (11)Used By (1)

Laravel Janus Gateway Client
============================

[](#laravel-janus-gateway-client)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a2c3c48b74206e68cf37a1188727ad6712972a947799c747d2c7eba262dfde79/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7274697070696e2f6a616e75732d636c69656e742e7376673f7374796c653d706c61737469632663616368655365636f6e64733d33363030)](https://packagist.org/packages/rtippin/janus-client)[![Total Downloads](https://camo.githubusercontent.com/84595c65c355b10183a857fcf005b575b6188d4d9f0bd06fcbeeed670065c001/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7274697070696e2f6a616e75732d636c69656e742e7376673f7374796c653d706c61737469632663616368655365636f6e64733d33363030)](https://packagist.org/packages/rtippin/janus-client)[![Tests](https://camo.githubusercontent.com/cffa34f8f8f1e6c95e589d97cf67eb41bee0488fd196d2a0e061ed0a33719058/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7274697070696e2f6a616e75732d636c69656e742f746573742e796d6c3f6272616e63683d6d6173746572267374796c653d706c6173746963)](https://github.com/RTippin/janus-client/actions)[![StyleCI](https://camo.githubusercontent.com/44ba0cf5ba1480f94227051c831a8b048ee56c6ac2f93121b1e38610c55874b8/68747470733a2f2f7374796c6563692e696f2f7265706f732f3338373537313932362f736869656c643f7374796c653d706c61737469632663616368655365636f6e64733d33363030)](https://styleci.io/repos/387571926)[![License](https://camo.githubusercontent.com/fea679f24bcaa30eb3136b847007403e3596b94a88e72d64a59d4ce57a65dca4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f5254697070696e2f6a616e75732d636c69656e743f7374796c653d706c6173746963)](https://packagist.org/packages/rtippin/janus-client)

---

### This package provides a client to fluently interact with your [Janus Gateway Server](https://janus.conf.meetecho.com/docs/index.html)

[](#this-package-provides-a-client-to-fluently-interact-with-your-janus-gateway-server)

### Prerequisites

[](#prerequisites)

LaravelPHPjanus-client`8.x``^7.4` `^8.0` `^8.1``= 1.1.0``10.x``^8.1` `^8.2``>= 1.2.0``11.x``^8.2` `^8.3``>= 1.3.0``12.x``^8.2` `^8.3` `^8.4``>= 1.4.0`Included
--------

[](#included)

- Core REST API wrapper to interact with janus.
- VideoRoom plugin wrapper.

---

**Fluent, convenient, clean.**

```
use RTippin\Janus\Facades\Janus;

$ping = Janus::ping();

---------------------------------------

['pong' => true]

---------------------------------------

$room = Janus::videoRoom()->create([
    'description' => 'My first room!',
    'publishers' => 4,
]);

---------------------------------------

[
  'videoroom' => 'created',
  'room' => 6663183870503329,
  'permanent' => false,
  'pin' => 'TFQuls',
  'secret' => 'y2WaVehf7cOM',
]
```

---

Installation
============

[](#installation)

### Via Composer

[](#via-composer)

```
composer require rtippin/janus-client
```

### Publish the config file

[](#publish-the-config-file)

```
php artisan vendor:publish --tag=janus
```

---

Config
======

[](#config)

```
'server_endpoint' => env('JANUS_SERVER_ENDPOINT'),
'admin_server_endpoint' => env('JANUS_ADMIN_SERVER_ENDPOINT'),
'verify_ssl' => env('JANUS_VERIFY_SSL', true),
'debug' => env('JANUS_DEBUG', false),
'admin_secret' => env('JANUS_ADMIN_SECRET'),
'api_secret' => env('JANUS_API_SECRET'),
'video_room_secret' => env('JANUS_VIDEO_ROOM_SECRET'),
```

- `server_endpoint` is the main HTTP endpoint for your janus server.
- `admin_server_endpoint` is the admin HTTP endpoint for your janus server.
- `verify_ssl` enables or disables our `Guzzle HTTP` calls from verifying the SSL.
- `debug` When enabled, each request in a cycle will dump the payload and responses.
- `admin_secret` API secret to access the admin endpoint.
- `api_secret` The general API secret.
- `video_room_secret` Optional video room secret to protect creates.

---

General Usage
=============

[](#general-usage)

- You may choose to use our provided facade, or dependency injection to access our core `Janus` class.

### Notice, `Janus` is registered as a singleton. Once you instantiate our class, it will be kept in memory with its current state for that request cycle.

[](#notice-janus-is-registered-as-a-singleton-once-you-instantiate-our-class-it-will-be-kept-in-memory-with-its-current-state--for-that-request-cycle)

Obtaining the `Janus` client
----------------------------

[](#obtaining-the-janus-client)

**Using Facade**

```
use RTippin\Janus\Facades\Janus;

$info = Janus::info() || Janus::getInstance()->info();
```

**Using Dependency Injection**

```
