Home

Hiyve RTC Client - WebRTC Communication Library

Version License Browser TypeScript

A comprehensive WebRTC client library for real-time communication, enabling audio/video conferencing with advanced features like recording, streaming, screen sharing, and file management.

Documentation

Resource Description
API Reference Complete Client class documentation
Workflow Guide Real-world workflow patterns and examples
DeviceCheck Guide Device compatibility validation
File Management Guide File filtering and management patterns
Connection Sequence Connection flow visualization

Features

  • HD Video Conferencing - High-quality audio and video with adaptive bitrate
  • Room Management - Create, join, and manage rooms with owner privileges
  • Screen Sharing - Share your screen or specific windows
  • Cloud Recording - Record meetings with automatic video composition
  • Live Streaming - Stream to external platforms (YouTube, Twitch, etc.)
  • Real-time Transcription - Live speech-to-text with AI summaries
  • In-Room Chat - Real-time messaging with history
  • File Sharing - Upload and share files with participants
  • TypeScript Support - Full type definitions included

Installation

CDN

<script src="https://s3.amazonaws.com/muzie.media/dist_latest/muziertcclient.js"></script>

NPM Registry

Add to your package.json:

{
  "dependencies": {
    "muziertcclient": "https://s3.amazonaws.com/muzie.media/npm-registry/muziertcclient/muziertcclient-1.0.1000.tgz"
  }
}

Quick Start

1. Server-side: Generate Room Token

app.post('/generate-room-token', async function (req, res) {
  try {
    const response = await fetch('https://rtc.muziemedia.com/room-token', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        apiKey: process.env.APIKEY,
        secret: process.env.CLIENT_SECRET
      }),
    });
    const data = await response.json();
    res.send(data);
  } catch (error) {
    res.status(500).send({ error: 'Error generating room token' });
  }
});

2. Client-side: Join a Room

const { Client, ClientEvents } = window.MuzieClient;

// Initialize client
const client = new Client({ roomToken: 'your-room-token' });

// Listen for remote participants
client.addEventListener(ClientEvents.MEDIA_TRACK_ADDED, (event) => {
  const { userId, track, kind, paused } = event.detail;
  if (kind === 'video') {
    const videoEl = document.getElementById(`remote-video-${userId}`);
    videoEl.srcObject = new MediaStream([track]);
  }
});

// Setup devices
const cameras = await client.listVideoDevices();
const mics = await client.listAudioInputDevices();
await client.setLocalVideoDevice({ videoDeviceId: cameras[0].deviceId });
await client.setLocalAudioInputDevice({ audioInputDeviceId: mics[0].deviceId });

// Create and join room
const room = await client.createRoom({
  roomName: 'my-meeting',
  userId: 'user-123'
});

// Connect media
await client.connectTransports({ localVideoElementId: 'local-video' });

See the Workflow Guide for complete examples including:

  • Token-based invites
  • Recording with transcription
  • Screen sharing
  • Waiting room management
  • And more...

Key Events

Event Description
CONNECTED WebRTC connection established
MEDIA_TRACK_ADDED Remote media track available
USER_JOINED_ROOM New participant joined
USER_DISCONNECTED Participant left
RECORDING_STARTED Recording in progress
TRANSCRIPTION_RECEIVED Live transcription text

See the API Reference for all 40+ events.

Browser Support

  • Chrome (desktop and Android)
  • Firefox (desktop and Android)
  • Safari (desktop and iOS)
  • Edge (Chromium-based)

License

Copyright 2023 by IWantToPractice, LLC. All rights reserved.

Use of this software is subject to license agreement. Unauthorized reproduction, distribution, or modification is expressly forbidden.