Skip to content

Embedded Resources

Fresh

Requires Stream Deck 7.1+

Overview

Embedded resources (audio, config files, etc.) can be attached to action instances for portability. When exported, resources compress alongside metadata into .streamDeckProfile or .streamDeckAction files.

API

MethodDescription
action.setResources(resources)Assign resources to an action
action.getResources()Retrieve resource file paths
onDidReceiveResourcesTriggered when PI updates resources

Resources are a map of key-to-file-path, allowing Stream Deck to remap paths during import/export.

Setting Resources

typescript
@action({ UUID: "com.example.play-audio" })
export class PlayAudio extends SingletonAction<Settings> {
  override async onDidReceiveSettings(ev: DidReceiveSettingsEvent<Settings>): Promise<void> {
    await ev.action.setResources({
      audioFile: ev.payload.settings.userSelectedFile,
    });
  }
}

Accessing Resources

typescript
override async onKeyDown(ev: KeyDownEvent<Settings>): Promise<void> {
  const resources = await ev.action.getResources();
  if (resources?.audioFile) {
    audioService.play(resources.audioFile);
  }
}

File Path Remapping

When actions are exported and imported, file paths are remapped:

StagePath Example
OriginalC:\audio\track.mp3
After importC:\...\7ae61d68-...\track.mp3

Original filenames are preserved, but directory paths change to UUID-based locations.