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.

Reference

Type definitions

type RegisterWebRenderer = {
url: string;
resolution: {
width: number;
height: number;
};
embeddingMethod?:
| "chromium_embedding"
| "native_embedding_over_content"
| "native_embedding_under_content";
}

Properties

url

Url of a website that to render.

  • Type: string

resolution

Resolution of the rendered website.

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

embeddingMethod

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.