1. Go to this page and download the library: Download eyeson/eyeson-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
eyeson / eyeson-php example snippets
$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('[email protected]');
// 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' => '[email protected]',
'name' => 'Mike',
'avatar' => 'https://mikes.website/avatar.png'
];
$room = $eyeson->join($user, 'daily standup');
if (!$room->isReady()) {
$room = $eyeson->waitReady($room);
}
// 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);
// Create a snapshot
$eyeson->createSnapshot($room);
// fetch snapshot details if needed
$eyeson->getSnapshotById($snapshotId);
// Force stop a running meeting.
$eyeson->shutdown($room);
// Register a webhook
$eyeson->addWebhook('https://my.application/hooks/recordings',
'recording_update');
// Clear webhook if not needed anymore
$eyeson->clearWebhook();