Skip to content

WebView

Required feature:web_renderer

WebView renders a website using Chromium engine embedded inside the Smelter instance.

Usage

To begin displaying a webpage using the WebView component, you need to register web renderer first.

Register web renderer

POST: /api/web-renderer/example_web_renderer/register
Content-Type: application/json
{
"url": "https://smelter.dev",
"resolution": { "width": 1920, "height": 1080 },
"embedding_method": "chromium_embedding"
}

After registering the web renderer, you can use WebView component in output stream.

Update output

POST: /api/output/example_output/update
Content-Type: application/json
{
"video": {
"root": {
"type": "view",
"children": [
{
"type": "web_view",
"instance_id": "example_web_renderer"
}
]
}
}
}

Reference

Type definitions

type WebView = {
id?: string;
children?: Component[];
instance_id: string;
}

Properties

id

ID of component.

  • Type: string

children

List of component’s children.

  • Type: Component[]

instance_id

ID of a web renderer instance. It identifies an instance registered using a register web renderer request.

  • Type: string