Skip to main content

LensStudio:Preview.StreamType

Class

Enum representing the type of preview stream.

Index

Example

// StreamType is an enum-like class with string constants identifying
// the kind of media stream used for a preview session.
// The constructor is protected — use the static members directly.
const { StreamType, Config, Input } = await import('LensStudio:Preview');

console.log('StreamType.Interactive:', StreamType.Interactive);
console.log('StreamType.Multimedia:', StreamType.Multimedia);
console.log('StreamType.None: ', StreamType.None);

// Use a StreamType value as the Input.type when building a Config.
const config = new Config();
const input = new Input();
input.type = StreamType.Interactive;
input.sourcePath = new Editor.Path('/path/to/source');
config.input = input;

console.log('Configured preview with input.type =', config.input.type);

Properties

Interactive

static Interactive: string

Stream type for interactive scene inputs, such as those returned by allScenes().


Multimedia

static Multimedia: string

Stream type for image and video file inputs, such as those returned by allImages() and allVideos().


None

static None: string

Stream type for no input. A Config whose input has this type cannot be applied to a preview.