Skip to content

More examples please and how do you select a source in a scene correctly? #52

Closed
@SonnyWalkman

Description

@SonnyWalkman

I'm having difficulty using the library.

//SetScene
	myscene := "TowerCam"
	n, err := client.Scenes.SetCurrentProgramScene(&scenes.SetCurrentProgramSceneParams{
		SceneName: myscene,
	})
	if err != nil {
		logger.Fatalf("🛑 %s", err)
		fmt.Println(n)
		return
	} else {
		logger.Infof("Scene %s selected\n", myscene)
	}

Works fine for scene

How do you properly select a source within a scene?
Below pulls no errors however, the source isn't selected. What is the need for SceneItemIndex: 3, SceneItemId: 3, SceneName: "MyScene"? Any combination breaks.

g, err := client.SceneItems.GetSceneItemId(&sceneitems.GetSceneItemIdParams{SourceName: "SMPTE-GS", SceneName: "TestCharts"})
	if err != nil {
		logger.Fatalf("🛑 %s", err)
		fmt.Println(g)
		return
	} else {
		fmt.Println(g)
	}
	//SetSource 1234
	mysource := "1234"
	d, err := client.SceneItems.SetSceneItemIndex(&sceneitems.SetSceneItemIndexParams{
		SceneItemIndex: 3,
		SceneItemId:    3,
		SceneName:      "MyScene",
	})
	if err != nil {
		logger.Fatalf("🛑 %s", err)
		fmt.Println(d)
		return
	} else {
		logger.Infof("Source %s selected\n", mysource)
		fmt.Println(d)
	}

Is there a method to shut OBS down? Apparently OBS can be closed via websockets?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions