A Location is a JSON object that represents a specific area or context in your application. Locations can represent:
  • Pages
  • Sections
  • Video frames
  • Data points on maps/charts
  • Any other contextual area
The location object has three special fields:
  • id (required): A unique identifier for the location that can be used to reference it later
  • locationName (recommended): A human-readable name displayed in Velt components like the VeltCommentsSideBar
  • version (optional): An object with id and name fields to track different versions of the location
Using Hooks:
useSetLocation({
  'id': 'locationId1',
  'locationName': 'MainVideoPlayer',
  'page': 'mainPage',
  'version': {
    'id': 'v2.3',
    'name': 'Version Name'
  },
  'videoFrame': '120'
  // You can keep adding more field to make the location very specific.
  // The field names can be anything.
})
Using API:
client.setLocation({
  'id': 'locationId1',
  'locationName': 'MainVideoPlayer',
  'page': 'mainPage',
  'version': {
    'id': 'v2.3',
    'name': 'Version Name'
  },
  'videoFrame': '120'
  // You can keep adding more field to make the location very specific.
  // The field names can be anything.
})