LensStudio:Preview.Input
ClassPreview input source, made of a source path and a stream type.
Index
Properties
Example
Feed an image or video file from disk to a preview.
import { LensPreview } from 'LensStudio:LensPreview';
import { Input, StreamType } from 'LensStudio:Preview';
export function useMediaFile(preview: LensPreview, file: Editor.Path): void {
const input = new Input();
input.type = StreamType.Multimedia;
input.sourcePath = file;
const config = preview.config;
config.input = input;
preview.config = config;
}
Constructors
Constructor
new Input():
Input
Constructs an empty Input. Set sourcePath and type before assigning it to a Config.
Returns
Input
Properties
sourcePath
sourcePath:
Path
Path of the media file or scene that feeds the preview.
type
type:
string
Stream type of the input, one of the StreamType values such as StreamType.Multimedia.