Skip to content

Allow presets to define a trigger #131

@arikorn

Description

@arikorn

Use case: define a preset for automating camera-switching in a video mixer.

Right now, the module can easily define an action that steps through a sequence of choices (for example, input sources). Videographers (at least in the GoStream FB group) want to be able to automatically "loop" through the sequence. This is "easily" done by hand in Companion using triggers, but I see no way to add it as a preset.

Put another way: I would like to have a preset button that activates a trigger. So ideally, the trigger definition would be added to the button definition. Alternatively, triggers can be defined separately. Either ways seems to present two hurdles:

  1. Defining the trigger in the preset
  2. Enabling/disabling (toggling) the trigger in the preset

Maybe something like:

		presets[`Program_${src.id}`] = {
			... ,
			trigger:  {
			    id: `module_xx_trigger_1`,
			    name: 'modulexx trigger',
			    events: [{timeInterval: 10}],
			    conditions: [],
			    actions: [{actionId: 'modulePGMseq', options: { ... }}],
			},
			steps: [
				{
				down: [
					{
						actionId: Internal:Enable_Trigger,
						options: {
							triggerId: `module_xx_trigger_1`,
							action: 'Toggle',
						},
					},
				],
				up: [],
				},
			],
	}

example sequence:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions