Skip to main content

Stream from the browser

The nanoStream Webcaster turns a browser into a live encoder. Your camera, microphone or screen goes straight to nanoStream over WebRTC, with nothing to install and no plugins. Use it for quick broadcasts, presenters without encoder know-how, or a "go live" button inside your own web app.

Three ways to use it​

WhereBest forWhat you do
Builder HubTrying it out in seconds, with or without an accountOpen Instant Live Stream, choose This browser, allow camera and mic, click Start Streaming
nanoStream DashboardGoing live on a stream of your organisation, with live statisticsOpen the Webcaster page of a stream and click Start Broadcast
Webcaster SDKA branded "go live" experience in your own web appAdd the JavaScript library to your page; see nanoStream Webcaster: getting started

All three send H.264 video and Opus audio over the same WHIP endpoint described on WebRTC & WHIP ingest. Viewers watch with the nanoStream Player like any other stream.

Before you start​

  • A current version of Chrome, Firefox or Safari on a desktop computer.
  • A camera and microphone, or a screen to share. The browser asks for access the first time.
  • For the Dashboard and SDK: a stream in your organisation.

Go live from the Builder Hub​

  1. Open https://builder.nanocosmos.net and start Instant Live Stream. This works as a guest too.
  2. Choose This browser and click Allow mic & camera.
  3. Pick your Camera and Microphone if you have more than one.
  4. Click Start Streaming. Your stream plays next to the preview, with latency and bitrate measured live.

As a guest, your test streams run on a shared demo account, so anyone with the stream name can watch. A free account gives you your own streams.

Go live from the nanoStream Dashboard​

  1. Open the Webcaster at https://dashboard.nanostream.cloud/webcaster, then select or create a stream. You can also open a stream directly: https://dashboard.nanostream.cloud/webcaster/YOUR-STREAM-ID.
  2. Click the settings button (available while you are not streaming) and choose:
    • Video source: camera or screen sharing.
    • Video quality: maximum video bitrate, resolution and frame rate.
    • Audio: input device and maximum audio bitrate.
  3. Click Start Broadcast in the toolbar.
  4. Use the toolbar to switch camera or audio on and off, stop streaming, or copy the playout link to share.

The statistics panel shows the health of your broadcast while you stream:

MetricWhat it tells you
Packet lossShare of packets lost on the way. High values mean an unstable connection.
Round-trip time (RTT)How long data takes to travel to the server and back
Send delayDelay in sending data; watch it for latency problems
Audio / video bitrate, frame rateWhat actually leaves your browser, shown as a live chart

Build it into your own page​

The Webcaster SDK (version 6) is available at https://github.com/nanocosmos/webcaster. A minimal setup creates a client with your stream name, then calls setup(), startPreview() and startBroadcast():

// Adjust the import path to where you placed the Webcaster library.
import { Webcaster } from './nanostream.webcaster.js';

const client = new Webcaster({
streamName: 'XXXXX-YYYYY' // your stream name
});

client.setup().then(() => {
client.startPreview('myPreviewElId'); // id of the preview element on your page
client.startBroadcast();
});

To pass custom parameters to your ingest webhook, URL-encode them into the stream name: 'XXXXX-YYYYY' + encodeURIComponent('?passcode=abc'). The SDK does not encode them for you.

Device selection, screen sharing, quality settings, reconnect and statistics are covered in Webcaster guides; the full API is in Webcaster API reference.

What can go wrong​

Message or symptomWhat to do
Camera and mic are blockedAllow them for the site (camera icon in the address bar or site settings), then try again
No camera or mic foundConnect a camera and microphone, then try again
High packet loss or RTTMove to a wired or more stable connection, or lower the video bitrate in the settings
Webhook doesn't receive your parametersURL-encode them before setting streamName
Stream can't be published behind a firewallAllow WebRTC ports, see WebRTC & WHIP ingest

Next steps​

tip

Try it in the Builder Hub: Instant Live Stream puts your camera live in the browser and plays it back next to you, latency included. Start for Free