0.0.3 • Published 9 days ago

jsxc-react-hook v0.0.3

Weekly downloads
-
License
-
Repository
-
Last release
9 days ago

jsxc-react-hook

Jsxc is a js/ts xmpp client, it support vedio/voice call. This is a react function version for JSXC. So you can use it in react application.

demo

when click 'show' button, it will show a jsxc instance

npm.io

usage

  • import {Jsxc} from 'jsxc-react-hook'
  • then copy public/jsxc.bundle.js(it changes according origin jsxc code) to you public folder which include entry html file, as demo example.

props

    boshUrl: string;
    id: string; (jid)
    pw: string; (password)
    marginTop?: string; (defalut is 40px)
    marginLeft?: string; (defalut is 40px)
    marginBottom?: string; (defalut is 40px)
    marginRight?: string; (defalut is 40px)
    fullscreen?: boolean; (defalut is false)
    jqueryUrl?: string;
    showMenu: "yes"|"no" (use boolean has bug in create-react-app)

api

origin api

can use jsxc native api in (windows as any).XX

new api

expose JID class. add new ap method directOpenChatWindow(string jid) it can open a chat window even the contact is not in roster list.

script

  • npm run dev: it will run a demo.
  • npm run build: it will build a lib according src source files.
  • !!!: you need install react-activation package. And add to arround the Jsxc component, so that it can work normally.:)
0.0.3

9 days ago

0.0.1

13 days ago

0.0.0

13 days ago

0.0.2

13 days ago

0.1.0

26 days ago