Auto-generate OBS source names and implement team-based stream organization #5
1 changed files with 17 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue