Auto-generate OBS source names and implement team-based stream organization #5

Merged
deco merged 6 commits from auto-generate-obs-source-names into main 2025-07-21 01:06:01 +03:00
Showing only changes of commit d2f53b8037 - Show all commits

View file

@ -401,12 +401,28 @@ async function createStreamGroup(groupName, streamName, teamName, url) {
if (!nestedSceneInTeam) { if (!nestedSceneInTeam) {
try { try {
await obsClient.call('CreateSceneItem', { const { sceneItemId } = await obsClient.call('CreateSceneItem', {
sceneName: groupName, sceneName: groupName,
sourceName: streamGroupName, sourceName: streamGroupName,
sceneItemEnabled: true sceneItemEnabled: true
}); });
console.log(`Added nested scene "${streamGroupName}" to team scene "${groupName}"`); 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) { } catch (e) {
console.error('Failed to add nested scene to team scene:', e.message); console.error('Failed to add nested scene to team scene:', e.message);
} }