@ravenkash/client
v0.1.5
Published
Official browser SDK for the Livqeno hosted platform — RTC and chat behind one object. A thin facade over @ravenkash/rtc and @ravenkash/chat.
Readme
@ravenkash/client
Livqeno for the browser, with RTC and chat behind one object.
Part of Livqeno, open-source real-time communication infrastructure.
This is a facade, not a third implementation: raven.rtc is a real
RTCClient from @ravenkash/rtc
and raven.chat is a real ChatClient from
@ravenkash/chat. Every
method, event and type documented for those packages applies here
unchanged, because they are those objects.
Only want calls? Use
@ravenkash/rtcdirectly — it pulls in no messaging code. This package is for apps that want both planes without wiring two clients, and it mirrors the shape@ravenkash/react-nativegives mobile, so the same mental model works on both.
Install
npm install @ravenkash/clientUse
RTC and chat credentials are independent, so supply whichever planes your app actually uses:
import { Raven } from '@ravenkash/client';
new Raven({ token, endpoint }); // calls only
new Raven({ chatToken, chatApiUrl }); // messaging only
new Raven({ token, endpoint, chatToken, chatApiUrl }); // bothconst raven = new Raven({ token, endpoint, chatToken, chatApiUrl });
const room = await raven.join('room_123');
await room.enableCamera();
await raven.chat!.connect({ room: 'room_123' });
await raven.chat!.sendMessage({ text: 'Hello' });Every value comes from your backend's token-mint response — none should be hand-constructed.
Live streaming
raven.live is available on every instance regardless of the credentials
the instance was built with: host, co-host and viewer tokens are minted
per stream, per role, by your backend.
const stream = await raven.live.join(credentials);
if (stream.isHost) await stream.room.enableCamera();Exports
Raven, createRaven, LiveStream, joinLiveStream, plus re-exported
Room, RTCClient, ChatClient, ChatMessage, RTCError types for
convenience.
Documentation
- Browser SDK reference · Chat SDK
- Runnable example:
examples/rtc-chat
License
MIT
