diff --git a/lib/obsClient.js b/lib/obsClient.js index b717728..8c5f7e0 100644 --- a/lib/obsClient.js +++ b/lib/obsClient.js @@ -401,12 +401,28 @@ async function createStreamGroup(groupName, streamName, teamName, url) { if (!nestedSceneInTeam) { try { - await obsClient.call('CreateSceneItem', { + const { sceneItemId } = await obsClient.call('CreateSceneItem', { sceneName: groupName, sourceName: streamGroupName, sceneItemEnabled: true }); console.log(`Added nested scene "${streamGroupName}" to team scene "${groupName}"`); + + // Set bounds to 1600x900 to match the source switcher dimensions + await obsClient.call('SetSceneItemTransform', { + sceneName: groupName, + sceneItemId: sceneItemId, + sceneItemTransform: { + alignment: 5, // Center alignment + boundsAlignment: 0, // Center bounds alignment + boundsType: 'OBS_BOUNDS_SCALE_INNER', // Scale to fit inside bounds + boundsWidth: 1600, + boundsHeight: 900, + scaleX: 1.0, + scaleY: 1.0 + } + }); + console.log(`Set bounds for nested scene to 1600x900`); } catch (e) { console.error('Failed to add nested scene to team scene:', e.message); }