// Set initial safe rendering area
await session.setScreenRegions({
safeRender: {
x: 0.1,
y: 0.1,
width: 0.8,
height: 0.8
}
});
// When keyboard appears, update both regions
await session.setScreenRegions({
safeRender: {
x: 0.1,
y: 0.1,
width: 0.8,
height: 0.5
},
keyboard: {
x: 0,
y: 0.5,
width: 1.0,
height: 0.5
}
});
// When keyboard disappears, only specify safeRender
// (keyboard region will be automatically removed)
await session.setScreenRegions({
safeRender: {
x: 0.1,
y: 0.1,
width: 0.8,
height: 0.8
}
});
Configuration for screen regions used by Lenses.
Screen regions help Lenses adapt their content placement based on the host application's UI layout. All coordinates are normalized (0.0 to 1.0) relative to the canvas dimensions.
Only the regions specified in this object will be active - any previously set regions not included will be automatically removed.