Skip to main content
Glama
builder.py2.2 kB
"""Composition builder method for BrowserFrame component.""" from typing import TYPE_CHECKING if TYPE_CHECKING: from chuk_motion.generator.composition_builder import CompositionBuilder def add_to_composition( builder: "CompositionBuilder", start_time: float, duration: float, url: str = "https://example.com", theme: str = "chrome", tabs: str | None = None, show_status: bool = False, status_text: str = "", content: str = "", width: int = 1200, height: int = 800, position: str = "center", shadow: bool = True, ) -> "CompositionBuilder": """Add a BrowserFrame component to the composition. Args: builder: The composition builder instance start_time: Start time in seconds duration: Duration in seconds url: URL to display in the address bar theme: Browser theme (light, dark, chrome, firefox, safari, arc) tabs: JSON string of tabs to display show_status: Show status bar at bottom status_text: Status bar text content: Content to display in browser window width: Browser window width height: Browser window height position: Position of browser window on screen shadow: Enable window shadow Returns: The builder instance for method chaining """ from chuk_motion.generator.composition_builder import ComponentInstance # Convert time to frames start_frame = builder.seconds_to_frames(start_time) duration_frames = builder.seconds_to_frames(duration) component = ComponentInstance( component_type="BrowserFrame", start_frame=start_frame, duration_frames=duration_frames, props={ "url": url, "theme": theme, "tabs": tabs, "showStatus": show_status, "statusText": status_text, "content": content, "width": width, "height": height, "position": position, "shadow": shadow, "start_time": start_time, "duration": duration, }, layer=5, ) builder.components.append(component) return builder

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chrishayuk/chuk-mcp-remotion'

If you have feedback or need assistance with the MCP directory API, please join our Discord server