livqenoDocs

ResourcesExamples

Examples

Real apps you can run, grouped by product.

Sometimes it's easiest to learn from working code. These are full apps you can run, not just snippets. Each one is in the Livqeno repo at examples/<name>, with a README that shows how to set it up.

How to use them: most examples have two halves, a small backend that makes tokens with your API key, and an app (web page or phone app) that uses them. Start a backend example (node-server or python-server) with your LIVQENO_API_KEY, then run the app example you're interested in against it.

Not sure where to start? Run video-call first. It's the Quickstart as a complete app.

Pick an example

ExampleProductWhat it shows
video-callRTCA simple two-person call with @livqeno/rtc
react-video-callRTCThe same call in React: camera, mic, screen share, device picker
mobile-rtc-chatRTCA call on a phone (React Native)
flutter-rtc-chatRTCA call on a phone (Flutter)
signaling-demoRTCOne HTML file that talks to signaling directly. No build step.
chatChatA working chat app with @livqeno/chat and @livqeno/react
rtc-chatRTC + ChatA call with a chat panel on the same screen
live-streaming-demoLiveOne host tab, one viewer tab, live chat and reactions
node-serverBackendAn Express server that makes RTC tokens with @livqeno/server
python-serverBackendThe same, with livqeno and FastAPI
media-demoRTCA small page with real video, plus a FastAPI server using livqeno

RTC

The core of video-call, which runs in the browser: create a client from the grant your server sent (resp), join a room, and turn on the camera and mic.

import { createRTCClient } from '@livqeno/rtc';
 
const client = createRTCClient({
  token: resp.token,
  endpoint: resp.endpoint,
  iceServers: resp.iceServers,
});
 
const room = await client.join('room-123');
await room.enableCamera();
await room.enableMicrophone();

How to make the token: Quickstart.

Chat

In the browser, once your backend has created the conversation and sent you a chat token (resp), connecting and sending takes two calls:

import { createChatClient } from '@livqeno/chat';
 
const chat = createChatClient(resp); // the whole grant: token + chatUrl + apiUrl
 
await chat.connect({ room: conversation.publicId });
await chat.sendMessage({ text: 'Hello everyone!' });
 
chat.on('message', (msg) => console.log(msg.senderId, msg.text));

How to set up the conversation: Chat quickstart.

Live streaming

A live stream is a call plus a chat. LiveStream.join() gives you both in one call. Here's the host's browser: your backend has already made the host's credentials (credentials), and this code goes live:

import { LiveStream } from '@livqeno/live';
 
const stream = await LiveStream.join({
  streamId,
  role: 'HOST',
  rtc: credentials.rtc,
  chat: credentials.chat,
});
 
await stream.room.enableCamera();
await stream.room.enableMicrophone();
 
// A Livqeno Chat conversation comes attached automatically.
await stream.chat.sendMessage({ text: "We're live!" });

The viewer side and reactions: Live streaming quickstart.

Next steps