Skip to content

WebRenderer

Required feature:web_renderer

Represents an instance of a website rendered using Chromium embedded in the Smelter instance. It is utilized by a WebView component. Ensure that the Smelter supports web rendering before utilizing the web renderer.

Reference

Type definitions

type WebRenderer = {
url: string;
resolution: {
width: u32;
height: u32;
};
embedding_method?:
| "chromium_embedding"
| "native_embedding_over_content"
| "native_embedding_under_content";
}

Properties

url

Url of a website that to render.

  • Type: string

resolution

Resulution of the rendered website.

  • Type: { width: u32; height: u32; }

embedding_method

Mechanism used to render input frames on the website.

  • Type: "chromium_embedding" | "native_embedding_over_content" | "native_embedding_under_content"

  • Supported values:

    • native_embedding_over_content - Renders a website without any inputs, then overlays the inputs onto the website.
    • native_embedding_under_content - Renders a website without any inputs, then underlays the inputs beneath the website.
    • chromium_embedding - Pass raw input frames as JS buffers so they can be rendered, for example, using a <canvas> component.

Environment variables