Skip to main content

Audio- / Video-Only

In addition to regular streaming, with the nanoStream Webcaster you can stream Audio-Only and Video-Only.

Audio-Only or Video-Only streaming is enabled by setting video or audio device to false in the configuration object passed to startPreview(config).

Audio-Only Streaming

audio-only streaming

To start Audio-Only streaming, we pass false to the video device configuration.

var videoDeviceConfig = {
device: false // setting a video device to "false" allows to stream Audio-Only
};

var audioDeviceConfig = {
device: 0 // we select the first available audio device
};

var config = {
videoDeviceConfig: videoDeviceConfig,
audioDeviceConfig: audioDeviceConfig,
elementId: videoElement
};

user.startPreview(config);

Video-Only Streaming

video-only streaming

To start Video-Only streaming, we pass false to the audio device configuration

var videoDeviceConfig = {
device: 0 // we select the first available video device
};

var audioDeviceConfig = {
device: false // setting an audio device to "false" allows to stream Video-Only
};

var config = {
videoDeviceConfig: videoDeviceConfig,
audioDeviceConfig: audioDeviceConfig,
elementId: videoElement
};

user.startPreview(config);