PHPackages                             eyeson/eyeson-php - 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. [API Development](/categories/api)
4. /
5. eyeson/eyeson-php

ActiveLibrary[API Development](/categories/api)

eyeson/eyeson-php
=================

PHP SDK for Eyeson API

v2.5.1(11mo ago)743.6k↓28%11MITPHPPHP ^5.4 || ^7.0 || ^8.0CI failing

Since Apr 4Pushed 11mo ago2 watchersCompare

[ Source](https://github.com/eyeson-team/eyeson-php)[ Packagist](https://packagist.org/packages/eyeson/eyeson-php)[ RSS](/packages/eyeson-eyeson-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (1)Versions (22)Used By (0)

eyeson-php
==========

[](#eyeson-php)

eyeson.team PHP library - create powerful video conferences on demand and easily integrate eyeson with your own PHP applications.

The library offers basic features of [eyeson API](https://www.eyeson.team "eyeson"). See the [API documentation](https://docs.eyeson.com/ "eyeson API Documentation") to get a full overview, create an [issue](https://github.com/eyeson-team/eyeson-php/issues "eyeson PHP Issues") if you found a bug or have a feature request. Feel free to add an [issue at the documentation repo](https://github.com/eyeson-team/api/issues "eyeson API issues") for any general questions you might have.

Installation using Composer
---------------------------

[](#installation-using-composer)

```
# required php version >= 5.4
$ composer require eyeson/eyeson-php
```

Usage
-----

[](#usage)

Provide your api key and quickly join any room using the join method. You can optionally provide [configuration options](/src/Resource/Room.php#L13) as a 3rd argument.

```
$eyeson = new Eyeson('');
// Join a new eyeson video meeting by providing a user's name.
$room = $eyeson->join('Mike', 'standup meeting');
$room->getUrl(); // https://app.eyeson.team? URL to eyeson.team video GUI
// If you do not provide a room name, eyeson will create one for you. Note that
// users **will join different rooms on every request**.
$room = $eyeson->join('mike@eyeson.team');
// You can add additional details to your user, which will be shown in the
// GUI. Choosing a unique identifier will keep the user distinct and ensures
// actions are mapped correctly to this record. E.g. joining the room twice will
// not lead to two different participants in a meeting.
$user = [
  'id' => 'mike@eyeson.team',
  'name' => 'Mike',
  'avatar' => 'https://mikes.website/avatar.png'
];
$room = $eyeson->join($user, 'daily standup');

$guest = $eyeson->registerGuest('John Doe', $room);
```

Before running any meeting related function like record, layout, or shutdown, make sure that the meeting/room is ready.

```
if (!$room->isReady()) {
  $room = $eyeson->waitReady($room);
}
```

You can control the meeting using a joined room, the actions will be triggered by the user who joined, use a control user on demand.

```
// Send chat message
$eyeson->sendMessage($room, 'hello world!');

// Start a video playback.
$playback = $eyeson->playback($room, [
  'url' => 'https://myapp.com/assets/video.webm',
  'audio' => true
]);
$playback->start();

// Start and stop a recording.
$recording = $eyeson->record($room);
$recording->start();
// later...
$recording->stop();
// check if recording is active
$recording->isActive();
// fetch recording details if needed
$eyeson->getRecordingById($recordingId);
$eyeson->deleteRecordingById($recordingId);
$recordingsList = $eyeson->getRecordingsList($room);

// Create a snapshot
$eyeson->createSnapshot($room);
// fetch snapshot details if needed
$eyeson->getSnapshotById($snapshotId);
$eyeson->deleteSnapshotById($snapshotId);
$snapshotsList = $eyeson->getSnapshotsList($room);

// Start and stop a broadcast.
$broadcast = $eyeson->broadcast($room, [
  'stream_url' => 'https://...'
]);
$broadcast->start();
// later...
$broadcast->stop();
// check if broadcast is active
$broadcast->isActive();

// Get list of meeting participants and filter for only active ("online")
$users = $eyeson->getUsersList($room, true);
// lock meeting room
$eyeson->lockMeeting($room);
// Force stop a running meeting.
$eyeson->shutdown($room);

$list = $eyeson->getAllCurrentMeetings();
```

Register webhooks to receive updates like new meetings, or recordings in your application.

```
// Register a webhook
$eyeson->addWebhook('https://my.application/hooks/recordings',
                    Eyeson::$webhookRecording);

// Clear webhook if not needed anymore
$eyeson->clearWebhook();
```

You can switch from the automatic layout handling to a custom layout and set user positions for the video podium. Note: Use an empty string for an empty position. Additionally, you can hide/show the name inserts in the video.

```
$layout = $eyeson->layout($room);
$layout->apply([
  'layout' => 'auto',
  'name' => 'present-lower-3',
  'users' => ["5eb3a...994", "5eb3a...d06", ...],
  'voice_activation' => true,
  'show_names' => false
]);
// switch back to automatic layout
$layout->useAuto();
// apply fixed custom layout
$layout->update($userList); // ["5eb3a...994", "5eb3a...d06"]
$layout->showNames();
$layout->hideNames();
```

Apply overlay and background images. You can send plain text that will automatilcally create an overlay.

```
$layer = $eyeson->layer($room);
$layer->apply([
  'url' => 'https://myapp.com/assets/meetingBackground.jpg',
  'z-index' => Eyeson::$layerBackground
]);

$layer->setText('Hello World!'); // DEPRECATED!

$layer->setImageURL('https://myapp.com/assets/meetingForeground.png');
$layer->setImageURL('https://myapp.com/assets/meetingBackground.jpg', Eyeson::$layerBackground);

$layer->sendImageFile('./overlay.png');
$layer->sendImageFile('./background.png', Eyeson::$layerBackground);

$layer->clear();
$layer->clear(Eyeson::$layerBackground);
```

Error handling
--------------

[](#error-handling)

API requests can throw an `EyesonApiError` which is an instance of the PHP `Exception`. Its `getMessage()` method contains the API response error message and `getCode()` contains the API response status code.

```
use EyesonTeam\Eyeson\Exception\EyesonApiError;

function startRecording($accessKey) {
  try {
    $recording = $eyeson->record($accessKey);
    return $recording->start();
  } catch (EyesonApiError $error) {
    error_log($error->getCode() . ' - ' . $error->getMessage());
    return false;
  }
}

startRecording($accessKey);
```

Permalink API
-------------

[](#permalink-api)

Since v2.2.0, eyeson-php includes functions to use with Permalink API. You can read more about it here: [https://docs.eyeson.com/docs/rest/advanced/permalink\_api](https://docs.eyeson.com/docs/rest/advanced/permalink_api)

```
$eyeson = new Eyeson('');

$permalink = $eyeson->permalink->create('', ['name' => '', 'widescreen' => true]);
echo $permalink->getId();
echo $permalink->getUrl();
echo $permalink->getGuestUrl();
echo $permalink->getUserToken();
echo $permalink->getGuestToken();

$permalink = $eyeson->permalink->update('', ['widescreen' => false]);
$permalink = $eyeson->permalink->getById('');
$permalink = $eyeson->permalink->getAll(['page' => 1, 'limit' => 50, 'expired' => false]);
$permalink = $eyeson->permalink->addUser('', '', ['id' => '']);
$eyeson->permalink->removeUser('', '');
$room = $eyeson->permalink->joinMeeting('');
$room = $eyeson->permalink->registerGuest('', '', ['id' => '']); # works only if $permalink->isStarted() === true
$eyeson->permalink->delete('');
```

Forward stream
--------------

[](#forward-stream)

Version 2.4.0 adds forward stream support. Learn more about it

```
$eyeson = new Eyeson('');
$room = $eyeson->join('Mike', 'standup meeting');

$forward = $eyeson->forward($room);
$forward->source('', '', 'audio,video', 'https://...');
$forward->mcu('', 'audio,video', 'https://...');
$forward->playback('', '', 'audio,video', 'https://...');

$forward->stop('');
```

Change log
----------

[](#change-log)

See [CHANGELOG.md](./CHANGELOG.md).

Development
-----------

[](#development)

You can use docker to run the testsuite, see the [Makefile](/Makefile) for details.

```
$ make build
$ make test
```

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance51

Moderate activity, may be stable

Popularity37

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 58% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~130 days

Recently: every ~85 days

Total

21

Last Release

347d ago

Major Versions

v1.5.2 → v2.0.02023-02-07

PHP version history (2 changes)v1.0.0PHP ^5.4 || ^7.0

v1.5.1PHP ^5.4 || ^7.0 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/8b4310c9726c83fb5384ad1746080bfb2636bfe3320fd1481cfca8b4216b56a7?d=identicon)[eyeson](/maintainers/eyeson)

---

Top Contributors

[![unused](https://avatars.githubusercontent.com/u/59397?v=4)](https://github.com/unused "unused (29 commits)")[![opusonline](https://avatars.githubusercontent.com/u/484618?v=4)](https://github.com/opusonline "opusonline (14 commits)")[![heitoralthmann](https://avatars.githubusercontent.com/u/1569874?v=4)](https://github.com/heitoralthmann "heitoralthmann (2 commits)")[![PHPGuus](https://avatars.githubusercontent.com/u/36767653?v=4)](https://github.com/PHPGuus "PHPGuus (1 commits)")[![dammyammy](https://avatars.githubusercontent.com/u/3688497?v=4)](https://github.com/dammyammy "dammyammy (1 commits)")[![wpp](https://avatars.githubusercontent.com/u/942021?v=4)](https://github.com/wpp "wpp (1 commits)")[![irworks](https://avatars.githubusercontent.com/u/5793142?v=4)](https://github.com/irworks "irworks (1 commits)")[![jkimbrel](https://avatars.githubusercontent.com/u/349214?v=4)](https://github.com/jkimbrel "jkimbrel (1 commits)")

---

Tags

apivideoeyeson

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/eyeson-eyeson-php/health.svg)

```
[![Health](https://phpackages.com/badges/eyeson-eyeson-php/health.svg)](https://phpackages.com/packages/eyeson-eyeson-php)
```

###  Alternatives

[alaouy/youtube

Laravel PHP Facade/Wrapper for the Youtube Data API v3

8091.3M9](/packages/alaouy-youtube)[shotstack/shotstack-sdk-php

Official PHP SDK for the Shotstack Cloud Video Editing API

1544.9k](/packages/shotstack-shotstack-sdk-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
