Skip to main content
Full Example AvailableThe complete working implementation is available on GitHub: RhombusSystems/player-example

Overview

The Rhombus video player integration enables you to:

Stream Live Video

Display real-time camera feeds with adaptive bitrate streaming

Secure Authentication

Use federated session tokens for time-limited, secure access

Optimized Playback

Pre-configured settings optimized for security camera footage

Easy Integration

Drop-in solution with minimal configuration required

Architecture

The video player implementation follows a three-tier architecture:
1

Frontend Requests Token

Your web application requests authentication from your backend server
2

Backend Proxies to Rhombus

Your server authenticates with Rhombus API using your API key and returns a federated token
3

Frontend Gets Media URI

Using the token, your frontend requests the camera’s streaming URI
4

Direct Stream Playback

DashJS player connects directly to Rhombus CDN using the authenticated URI

Prerequisites

Before implementing the video player, ensure you have:
Generate an API key from your Rhombus Console. This key will be used by your backend server to authenticate with the Rhombus API.
Never expose your API key in frontend code. Always use a backend proxy server.
Obtain your camera’s UUID from the Rhombus Console or via the API:
Set up a proxy server to handle API authentication. Your server must implement two endpoints:
  • Token generation endpoint (forwards to /org/generateFederatedSessionToken)
  • Media URI endpoint (forwards to /camera/getMediaUris)

Implementation Guide

Step 1: Set Up Your HTML Page

Create a basic HTML structure with the DashJS player:
index.html

Step 2: Configure Player Settings

Create your player configuration file:
player.js

Step 3: Implement Authentication

Add token management functionality:
Token Management

Step 4: Get Media Stream URI

Implement media URI retrieval:
Media URI Request

Step 5: Initialize DashJS Player

Set up the video player with optimized settings:
Player Initialization

Step 6: Add Playback Controls

Implement play/pause functionality:
Playback Controls

Backend Server Implementation

Your backend server must proxy requests to the Rhombus API. Here’s an example using Node.js/Express:
server.js

Player Configuration Options

The DashJS player can be customized with various settings optimized for different use cases:
boolean
default:"true"
Enable automatic catch-up to live edge when playback falls behind
number
default:"10"
Maximum allowed drift from live edge in seconds before catch-up kicks in
number
default:"12"
Target buffer size for stable playback in seconds
boolean
default:"false"
Disable fast quality switching to maintain consistent video quality
boolean
default:"true"
Automatically skip small gaps in the stream
number
default:"0.5"
Time in seconds before considering playback stalled

Security Best Practices

Critical Security RequirementsFollow these security practices to protect your API credentials and ensure secure streaming:
  • Store API keys only on your backend server
  • Use environment variables for sensitive credentials
  • Never commit API keys to version control
  • Rotate keys regularly
  • Authenticate users before granting stream access
  • Implement rate limiting on your proxy endpoints
  • Log all access requests for audit trails
  • Use short-lived federated tokens (24 hours or less)
  • Sanitize camera UUID inputs
  • Validate token expiration
  • Check user permissions before proxying requests
  • Implement CSRF protection
  • Enforce HTTPS for all communications
  • Implement proper SSL/TLS certificates
  • Enable HSTS headers
  • Validate certificate chains

Troubleshooting

Check these common issues:
  1. Verify your backend server is running and accessible
  2. Confirm camera UUID is correct (check Rhombus Console)
  3. Check browser console for error messages
  4. Verify API key has proper permissions
  5. Ensure CORS is properly configured on your server
Test your endpoints:
Buffering or stuttering:
  • Reduce bufferTimeAtTopQuality for faster startup
  • Increase stableBufferTime for smoother playback
  • Check network bandwidth and latency
  • Verify CDN connectivity
Stream disconnects:
  • Check token expiration (default 24 hours)
  • Verify continuous network connectivity
  • Review firewall rules for CDN access
  • Check browser console for errors
Token generation fails:
  • Verify API key is valid and not expired
  • Check API key permissions in Rhombus Console
  • Ensure headers are correctly formatted
  • Verify account is active
Token rejected during playback:
  • Check token expiration time
  • Verify URL parameters are properly appended
  • Ensure token is correctly passed to all requests
  • Check for special characters in token

Advanced Features

Multi-Camera Grid

Display multiple camera feeds simultaneously:
Multi-Camera Setup

Custom Controls

Build custom video controls:
Custom Controls

Next Steps

GitHub Example

Clone the complete working example

DashJS Documentation

Learn more about DashJS configuration

Get Support

Join the developer community for help

Support

Need help with your implementation?
This implementation guide is based on the official Rhombus player example and is regularly updated to reflect best practices.
Last modified on July 8, 2026