//Set Location
client.setLocation({
	'id': 'locationId1',
	'locationName': 'Scene1LocationName',
	'version': {
		'id': 'v1.0',
		'name': 'Version Name'
	},
	'page': 'mainPage',
	'videoFrame': '120'
})

//Add another Location
client.setLocation({
	'id': 'locationId2',
	'locationName': 'Scene2LocationName',
	'version': {
		'id': 'v1.0',
		'name': 'Version Name'
	},
	'page': 'mainPage',
	'videoFrame': '240'
},true)

//Remove first Location
client.removeLocation({
	'id': 'locationId1',
	'locationName': 'Scene1LocationName',
	'version': {
		'id': 'v1.0',
		'name': 'Version Name'
	},
	'page': 'mainPage',
	'videoFrame': '120'
});

Adding multiple Locations

  • React / Next.js

  • HTML

1

Removing all Locations

To remove all locations, use the client.removeLocation() method.

client.removeLocation()
2

Removing specific Locations

If you have added multiple locations and only want to remove one of them, you can remove it by using client.removeLocation() and by passing in the exact location object you want to remove.

// remove specific location
const locationToRemove = {
	// your custom location object
}
client.removeLocation(locationToRemove);