{"id":14384525,"url":"https://github.com/this-fifo/jutsu","last_synced_at":"2025-05-16T02:07:14.980Z","repository":{"id":38954208,"uuid":"250667156","full_name":"this-fifo/jutsu","owner":"this-fifo","description":"A jitsi meet component wrapper and custom hook moulded with react's chakra 💠","archived":false,"fork":false,"pushed_at":"2025-02-15T12:14:38.000Z","size":2866,"stargazers_count":153,"open_issues_count":2,"forks_count":53,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-08T12:07:24.319Z","etag":null,"topics":["conference","jitsi","jitsi-meet","meeting-room","react","video-conferencing"],"latest_commit_sha":null,"homepage":"https://this-fifo.github.io/jutsu/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/this-fifo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["this-fifo"]}},"created_at":"2020-03-27T22:58:26.000Z","updated_at":"2025-03-04T07:56:44.000Z","dependencies_parsed_at":"2023-02-05T07:30:47.137Z","dependency_job_id":"54e7facd-cff3-47eb-8e26-3ced504ac671","html_url":"https://github.com/this-fifo/jutsu","commit_stats":{"total_commits":92,"total_committers":12,"mean_commits":7.666666666666667,"dds":0.4347826086956522,"last_synced_commit":"a02391f474677e4956d2ed40caecbf79671f3313"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/this-fifo%2Fjutsu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/this-fifo%2Fjutsu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/this-fifo%2Fjutsu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/this-fifo%2Fjutsu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/this-fifo","download_url":"https://codeload.github.com/this-fifo/jutsu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254453651,"owners_count":22073617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["conference","jitsi","jitsi-meet","meeting-room","react","video-conferencing"],"created_at":"2024-08-28T18:01:26.839Z","updated_at":"2025-05-16T02:07:14.962Z","avatar_url":"https://github.com/this-fifo.png","language":"JavaScript","funding_links":["https://github.com/sponsors/this-fifo"],"categories":["JavaScript"],"sub_categories":[],"readme":"# \u0026lt;Jutsu /\u0026gt;\n\u003e A jitsi meet component wrapper and custom hook moulded with react's chakra 💠\n\n[View live demo](https://this-fifo.github.io/jutsu/)\n\n[![NPM](https://img.shields.io/npm/v/react-jutsu.svg)](https://www.npmjs.com/package/react-jutsu)\n\n## Install\n\n```bash\nyarn add react-jutsu\n```\n\n## Add the Jitsi Meet API js file to the html body\n\n```html\n\u003cbody\u003e\n  \u003cscript src='https://meet.jit.si/external_api.js'\u003e\u003c/script\u003e\n\u003c/body\u003e\n```\n\n\u003e You can choose to load the script another way, the hook will return an error until the jitsi API is available in `window` scope.\n\n## Two options\n\u003e You can use the provided component for simple scenarios or the hook for access to the jitsi meet api\n```js\nimport { Jutsu } from 'react-jutsu' // Component\nimport { useJitsi } from 'react-jutsu' // Custom hook\n```\n\n## Sample Usage (Hook)\n```jsx\nimport React, { useEffect } from 'react'\nimport { useJitsi } from 'react-jutsu'\n\nconst App = () =\u003e {\n  const jitsiConfig = {\n    roomName: 'konoha',\n    displayName: 'Naruto Uzumaki',\n    password: 'dattebayo',\n    subject: 'fan',\n    parentNode: 'jitsi-container',\n  };\n  const { loading, error, jitsi } = useJitsi(jitsiConfig);\n\n  return (\n    \u003cdiv\u003e\n      {error \u0026\u0026 \u003cp\u003e{error}\u003c/p\u003e}\n      \u003cdiv id={jitsiConfig.parentNode} /\u003e\n    \u003c/div\u003e\n  );\n}\n```\n\n## Sample Usage (Component)\n```jsx\nimport React, { useState } from 'react'\n\nimport { Jutsu } from 'react-jutsu'\n\nconst App = () =\u003e {\n  const [room, setRoom] = useState('')\n  const [name, setName] = useState('')\n  const [call, setCall] = useState(false)\n  const [password, setPassword] = useState('')\n\n  const handleClick = event =\u003e {\n    event.preventDefault()\n    if (room \u0026\u0026 name) setCall(true)\n  }\n\n  return call ? (\n    \u003cJutsu\n      roomName={room}\n      displayName={name}\n      password={password}\n      onMeetingEnd={() =\u003e console.log('Meeting has ended')}\n      loadingComponent={\u003cp\u003eloading ...\u003c/p\u003e}\n      errorComponent={\u003cp\u003eOops, something went wrong\u003c/p\u003e} /\u003e\n  ) : (\n    \u003cform\u003e\n      \u003cinput id='room' type='text' placeholder='Room' value={room} onChange={(e) =\u003e setRoom(e.target.value)} /\u003e\n      \u003cinput id='name' type='text' placeholder='Name' value={name} onChange={(e) =\u003e setName(e.target.value)} /\u003e\n      \u003cinput id='password' type='text' placeholder='Password (optional)' value={password} onChange={(e) =\u003e setPassword(e.target.value)} /\u003e\n      \u003cbutton onClick={handleClick} type='submit'\u003e\n        Start / Join\n      \u003c/button\u003e\n    \u003c/form\u003e\n  )\n}\n\nexport default App\n```\n\n## Supported Configuration\n\u003e Check the [Jitsi Meet API docs](https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-iframe) for full configuration and how to use api commands when using the `useJitsi` hook\n\n### Room Name\nThe meeting room name\n\u003eThis prop is required to start a meeting\n\n### Display Name\nThe participant's displayed name\n\u003eThis prop is optional\n\n### Password\nThe meeting room password\n\u003eThis prop is optional\n\n### onMeetingEnd\nCallback function executed after readyToClose event is fired\n\u003eThis prop is optional\n\n### Subject\nThe meeting subject (what is displayed at the top)\n\u003eThis prop is optional\n\n```jsx\n\u003cJutsu\n  subject='fan'\n  roomName='naruto'\n  password='dattebayo'\n  displayName='uzumaki'\n  onMeetingEnd={() =\u003e console.log('Meeting has ended')}\n/\u003e\n```\n\n### Domain\n```jsx\n\u003cJutsu domain='my-custom-domain.com'\u003e\n```\nYour Jitsi domain to use, the default value is `meet.jit.si`\n\n### Loading Component\n```jsx\n\u003cJutsu loadingComponent={\u003cProgressBar /\u003e}\u003e\n```\nAn optional loading component, the default value is `\u003cp\u003eLoading ...\u003c/p\u003e`\n\n### Error Component\n```jsx\n\u003cJutsu errorComponent={\u003cp\u003eOops, something went wrong...\u003c/p\u003e}\u003e\n```\nAn optional error component, the default value is a `\u003cp\u003e` containing the error.\n\n### Styles\nInternally Jutsu is constructed inside 2 containers, you can add custom styles for each by specifying `containerStyles` and `jitsiContainerstyles`\n\nThe default values set as\n\n```jsx\n\u003cdiv\n  style={{...{\n    width: '800px',\n    height: '400px'\n  }, ...containerStyles}}\n\u003e\n  \u003cdiv\n    style={{...{\n      display: loading ? 'none' : 'block', // \u003c- used for loadingComponent logic\n      width: '100%',\n      height: '100%'\n    }, ...jitsiContainerStyles}}\n  /\u003e\n\u003c/div\u003e\n```\n\nAn example override could be\n```jsx\n\u003cJutsu containerStyles={{ width: '1200px', height: '800px' }}\u003e\n```\n\n### configOverwrite\nConfiguration object to overwrite.\n\u003eThis prop is optional\n\u003eMore details about possible key/values [here](https://github.com/jitsi/jitsi-meet/blob/master/config.js)\n\n### interfaceConfigOverwrite\nInterface configuration object to overwrite.\n\u003eThis prop is optional\n\u003eMore details about possible key/values [here](https://github.com/jitsi/jitsi-meet/blob/master/interface_config.js)\n\n### onError\nCallback function to be called with an error as the only parameter if any.\n\u003eThis prop is optional\n\n### onJitsi\nCallback function to be called with the jitsi API client when instantiated.\n\u003eThis prop is optional\n\n### any other prop\nAny other prop passed to the component will be passed to jitsi API constructor as part of the `options` parameter.\n\u003e For instance: `jwt`, `devices`, `userInfo`\n\n## License\n\nMIT © [this-fifo](https://github.com/this-fifo)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthis-fifo%2Fjutsu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthis-fifo%2Fjutsu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthis-fifo%2Fjutsu/lists"}