Skip to main content

VIDEO_STREAM

Constant VIDEO_STREAM 

Source
pub const VIDEO_STREAM: &str = "type VideoStream {\n  source: Str = \"camera\";\n  width: Number = 1;\n  height: Number = 1;\n}";
Expand description

A live video input request with display dimensions.

The host owns permission, capture lifecycle, frame orientation, and resource contention. The default camera string is only a requested source selector.

§Declaration

type VideoStream {
  source: Str = "camera";
  width: Number = 1;
  height: Number = 1;
}

§Fields and methods

  • source: Host-defined live-video selector; defaults to camera.

  • width: Requested display width in scene units; defaults to 1.

  • height: Requested display height in scene units; defaults to 1.

§Request a stream

A host must grant permission and create the actual capture session.

let value = VideoStream {};
print(value.source);