Getting started
If you have not created an account yet, you can sign up or reach out to our dedicated sales team via the contact form or by sending an email to sales(at)nanocosmos.de.
Overview
This section provides a straightforward guide to initiate your journey with Webcaster. The provided snippet exemplifies the elementary steps to set up and start a live stream using Webcaster.
Prerequisites
- Download and include the Webcaster JavaScript file in your project.
- Create a new stream. Read about stream creation via the nanoStream Cloud dashboard here.
- Basic understanding of TypeScript or JavaScript is advantageous.
Implementation
Include Webcaster: Ensure the Webcaster JavaScript file is downloaded and included in your project.
Configure Webcaster: Create a configuration object with essential properties, notably the bintu stream name.
- Find the Webcaster Client API docs here.
Instantiate Webcaster: Initialize a
Webcaster
instance with your configuration.Setup and Begin Streaming:
- Execute the
setup
method to configure your client. - Employ
startPreview
to initiate video preview. - Utilize
startBroadcast
to commence your live stream.
- Execute the
Code Snippet
import { Config as WebcasterConfig, Webcaster } from '../../dist/nanostream.webcaster';
const config: WebcasterConfig = {
streamName: 'my-nanostream-name'
};
const client = new Webcaster(config);
client.setup().then(fullCfg => {
console.log(fullCfg);
client.startPreview('myPreviewElId');
client.startBroadcast();
});
Next Steps
With the fundamental streaming setup complete, you are encouraged to delve into more sophisticated functionalities like stream control, metrics integration, and personalization. For comprehensive information, refer to the detailed feature sections in the Webcaster SDK documentation.