malanciault/illuxi-eyeson-php

eyeson API PHP Library

v1.5.1 2021-09-30 18:16 UTC

This package is not auto-updated.

Last update: 2024-04-27 04:36:15 UTC


README

Build Status

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.team. See the API documentation to get a full overview, create an issue if you found a bug or have a feature request. Feel free to add an issue at the documentation repo for any general questions you might have.

Usage

Provide your api key and quickly join any room using the join method. You can optionally provide configuration options as a 3rd argument.

$eyeson = new Eyeson('<your-eyeson-api-key>');
// Join a new eyeson video meeting by providing a user's name.
$room = $eyeson->join('Mike', 'standup meeting');
$room->getUrl(); // https://app.eyeson.team?<token> 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');

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.

// Force stop a running meeting.
$eyeson->shutdown($room);
// Start and stop a recording.
$recording = $eyeson->record($room);
$recording->isActive(); // true
$recording->stop();

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

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

You can switch from the automatic layout handling to a custom layout and set up to four 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->getLayout($room);
$layout->update($userList); // ["5eb3a...994", "5eb3a...d06"]
$layout->useAuto();
$layout->showNames();
$layout->hideNames();

Install the library using Composer

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

Development

You can use docker to run the testsuite, see the Makefile for details.

$ make build
$ make test