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
SMELTER_WEB_RENDERER_ENABLE
(default:false
) - Enables web rendering capabilities.SMELTER_WEB_RENDERER_GPU_ENABLE
(default:true
) - If enabled, websites are rendered on GPU. Otherwise, software based rendering is used.