streemo-video-call-sdk
v0.2.15
Published
Production-ready React SDK UI kit for Streemo chat and calls
Readme
streemo-video-call-sdk
Production-ready React UI kit and headless hooks for Streemo realtime chat and video calls.
Install
npm install streemo-video-call-sdkQuick start (under 5 minutes)
import {
StreemoClient,
StreemoProvider,
StreemoTheme,
Chat,
ChannelList,
Channel,
MessageList,
MessageInput,
TypingIndicator,
} from 'streemo-video-call-sdk'
import 'streemo-video-call-sdk/styles.css'
const client = new StreemoClient({
apiKey: 'YOUR_APP_ID',
userToken: 'USER_TOKEN',
user: { id: 'u-1', name: 'Alice' },
baseUrl: 'https://api.streemo.ru',
})
export function App() {
return (
<StreemoProvider client={client}>
<StreemoTheme theme={{ primary: '#635bff', radius: '10px' }}>
<Chat>
<ChannelList />
<Channel>
<MessageList />
<TypingIndicator />
<MessageInput />
</Channel>
</Chat>
</StreemoTheme>
</StreemoProvider>
)
}Call UI
import { CallRoom, ParticipantGrid, CallControls } from 'streemo-video-call-sdk'
export function SupportCall() {
return (
<CallRoom roomId="support-call">
<ParticipantGrid />
<CallControls />
</CallRoom>
)
}Build and publish
npm run clean
npm run build
npm publish --access public