Package: jitsi
Generated from api/packages/jitsi
Source: api/packages/jitsi · imported version 0.1.2. The sections after the README are extracted from the code on every docs build.
README
Section titled “README”Jitsi integration
What does it do
Section titled “What does it do”This package introduce just a facade that you can use to generate parameters for jitsi player
Installing
Section titled “Installing”composer require ulams/jitsi- Setup environmental config to point to Jitsi service - use either
envfile or Settings package (settings should be visible in the settings endpoint)
return [ 'host' => env('JITSI_HOST', 'meet-stage.ulams.app'), 'app_id' => env('JITSI_APP_ID', 'meet-id'), 'secret' => env('JITSI_APP_SECRET', 'secret'), 'package_status' => 'enabled',];If app_id or secret service will skip JWT token generation.
Once you provide the above you can generate parameters, example from tinker
\Ulams\Jitsi\Facades\Jitsi::getChannelData(App\Models\User::find(1), "czesc ziomku", true, ['logoImageUrl'=>'https://ulams.pl/_next/image?url=%2Fimages%2Flogo-ulams.svg&w=3840&q=75'])would generate some thing like
[ "data" => [ "domain" => "meet-stage.ulams.app", "roomName" => "czescZiomku", "configOverwrite" => [ "logoImageUrl" => "https://ulams.pl/_next/image?url=%2Fimages%2Flogo-ulams.svg&w=3840&q=75", ], "interfaceConfigOverwrite" => [ ], "userInfo" => [ "id" => 1, "name" => "Osman Kanu", "displayName" => "Osman Kanu", "email" => "student@ulams.com", "moderator" => true, ], "jwt" => "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJtZWV0LWlkIiwiYXVkIjoibWVldC1pZCIsInN1YiI6Im1lZXQtc3RhZ2UuZXNjb2xhbG1zLmNvbSIsImV4cCI6MTY0MzY1OTM1NCwicm9vbSI6ImN6ZXNjWmlvbWt1IiwidXNlciI6eyJpZCI6MSwibmFtZSI6Ik9zbWFuIEthbnUiLCJkaXNwbGF5TmFtZSI6Ik9zbWFuIEthbnUiLCJlbWFpbCI6InN0dWRlbnRAZXNjb2xhLWxtcy5jb20iLCJtb2RlcmF0b3IiOmZhbHNlfX0.xnFV-Kk63c3YRADzkSQLz6FP71yfEUO7Q53isFGkv_U", ], "host" => "meet-stage.ulams.app", "url" => "https://meet-stage.ulams.app/czescZiomku?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJtZWV0LWlkIiwiYXVkIjoibWVldC1pZCIsInN1YiI6Im1lZXQtc3RhZ2UuZXNjb2xhbG1zLmNvbSIsImV4cCI6MTY0MzY1OTM1NCwicm9vbSI6ImN6ZXNjWmlvbWt1IiwidXNlciI6eyJpZCI6MSwibmFtZSI6Ik9zbWFuIEthbnUiLCJkaXNwbGF5TmFtZSI6Ik9zbWFuIEthbnUiLCJlbWFpbCI6InN0dWRlbnRAZXNjb2xhLWxtcy5jb20iLCJtb2RlcmF0b3IiOmZhbHNlfX0.xnFV-Kk63c3YRADzkSQLz6FP71yfEUO7Q53isFGkv_U", ]pass this object into endpoint that generates jitsi call. You should definitely read the manual before.
Example
import React from "react";import JitsiMeeting from "@jitsi/web-sdk/lib/components/JitsiMeeting";import type { IJitsiMeetExternalApi, IJitsiMeetingProps,} from "@jitsi/web-sdk/lib/types";
const dataFromEndpoint = { domain: "meet-stage.ulams.app", roomName: "czescZiomku", configOverwrite: {}, interfaceConfigOverwrite: {}, userInfo: { displayName: "Osman Kanu", email: "student@ulams.com", }, jwt: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJtZWV0LWlkIiwiYXVkIjoibWVldC1pZCIsInN1YiI6Im1lZXQtc3RhZ2UuZXNjb2xhbG1zLmNvbSIsImV4cCI6MTY0MzY1OTM1NCwicm9vbSI6ImN6ZXNjWmlvbWt1IiwidXNlciI6eyJpZCI6MSwibmFtZSI6Ik9zbWFuIEthbnUiLCJkaXNwbGF5TmFtZSI6Ik9zbWFuIEthbnUiLCJlbWFpbCI6InN0dWRlbnRAZXNjb2xhLWxtcy5jb20iLCJtb2RlcmF0b3IiOmZhbHNlfX0.xnFV-Kk63c3YRADzkSQLz6FP71yfEUO7Q53isFGkv_U",};
const data: IJitsiMeetingProps = { ...dataFromEndpoint, onApiReady: (api) => console.log("api ready", api),};
function App() { return ( <div className="App"> <JitsiMeeting {...data} /> </div> );}
export default App;Run ./vendor/bin/phpunit --filter 'Ulams\\Jitsi\\Tests' to run tests. See tests folder as it’s quite good staring point as documentation appendix.
API endpoints
Section titled “API endpoints”| Method | Path | Auth | Action |
|---|---|---|---|
POST |
/api/jitsi/recorded-video |
JitsiApiController@recordedVideo |
Permissions
Section titled “Permissions”None.
Settings
Section titled “Settings”Registered with AdministrableConfig::registerConfig (editable in the admin panel under Configuration → Settings).
| Key | Rules | Public | Read-only |
|---|---|---|---|
jitsi.package_status |
nullable, string, in: . implode(,, PackageStatusEnum::getValues()) | no | |
jitsi.jitsi_host |
nullable, string | yes | |
jitsi.app_id |
nullable, string | no | |
jitsi.secret |
nullable, string | no | |
jitsi.jaas_host |
nullable, string | yes | |
jitsi.aud |
nullable, string | no | |
jitsi.iss |
nullable, string | no | |
jitsi.kid |
nullable, string | no | |
jitsi.private_key |
nullable, string | no | |
jitsi.sub |
nullable, string, false | yes | |
jitsi.recording |
nullable, boolean, false | yes |
Events
Section titled “Events”None.
Artisan commands
Section titled “Artisan commands”None.
Scheduled jobs
Section titled “Scheduled jobs”None.
Environment variables read
Section titled “Environment variables read”JAAS_AUD, JAAS_HOST, JAAS_ISS, JAAS_KEY_ID, JAAS_PRIVATE_KEY, JAAS_RECORDING, JAAS_SUB, JITSI_APP_ID, JITSI_APP_SECRET, JITSI_HOST, JITSI_RECORDING_DOWNLOAD_TIMEOUT, JITSI_RECORDING_HOSTS, JITSI_RECORDING_MAX_BYTES, JITSI_WEBHOOK_SECRET, JITSI_WEBHOOK_TOKEN, JITSI_WEBHOOK_TOLERANCE