Skip to main content
Documentation

Background Music

Play background audio alongside narration with Vreo background-music keyframes.

Overview

Background Music (BgMusic) adds background audio to a spatial tour to enrich the narration experience (the background music plays in parallel with the narration audio).

Usage

To use the background music feature, you only need to add data with type=BgMusic to the keyframes of the script structure. The 3D spatial script player parses this type of frame data and renders it for background music playback.

Field Reference

Info

BgMusicData is { url: string }; see the versioned Vreo type definitions.

// Snippet example
{
  "uuid": "daf3e3a8-7b48-4df3-eec5-bdc2a1a1c123",
  // highlight-start
  "type": "BgMusic",
  // highlight-end
  "start": 2000,
  "end": 46000,
  "parsed": false,
  "data": {
    // highlight-start
    "url": "" // CDN address of the .mp3 background music
    // highlight-end
  }
}

Tip

For multiple background music frames, simply provide one json block per segment.