Position/size a source
set_source_transformAdjust a source's position and size on a canvas using exact pixel coordinates. Specify x, y, width, height, and format to build separate desktop and mobile layouts for streaming.
Instructions
Set a source's position and/or size on a canvas. Coordinates are absolute pixels: the horizontal (desktop) canvas is 1920×1080, the vertical (mobile) canvas is 1080×1920. Provide any of x, y, width, height (omitted keys unchanged). ALWAYS set the two canvases SEPARATELY (format:'horizontal' then format:'vertical'); a desktop layout never maps 1:1 to mobile. Desktop examples: fullscreen bg {x:0,y:0,width:1920,height:1080}; bottom-right cam {x:1400,y:790,width:480,height:270}. MOBILE (vertical 1080×1920) is a tall portrait frame; rethink the layout, don't shrink the desktop one. Good mobile patterns: (a) CAM + SCREEN: full-width square camera at the TOP {x:0,y:0,width:1080,height:1080}, and the 16:9 screen/game below it centred in the lower band {x:0,y:1196,width:1080,height:608}. (b) CAM-ONLY (just chatting): a large cam centred {x:0,y:420,width:1080,height:1080}. (c) GAME + FACECAM: game full-width at top {x:0,y:280,width:1080,height:608}, circle facecam lower {width:300,height:300}. Fill the tall frame; avoid large empty bands.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| width | No | ||
| format | No | Canvas (default both). | |
| height | No | ||
| scene_id | No | ||
| source_id | Yes |