Vision Module
The vision module allows you to receive and interact with in-game events, such as health changes, eliminations, victories, and more.
Required Permissions: slobs.vision
initiateSubscription method
method
initiateSubscription(): void
This function must be called before any events or state can be received.
Example
streamlabsOBS.v1.Vision.initiateSubscription();
UserStateTree object
object
{
"vision": {
"fortnite": {
"eliminations": {
"session": 152
}
}
}
}
UserState object
object
{
"vision.fortnite.eliminations.session": 152
}
VisionEventsPayload object
object
Property | Type | Description |
---|---|---|
vision_event_id | string | A persistent, immutable, and unique identifier for this payload |
events | VisionEvent[] | |
game | string | |
timestamp | number |
VisionEvent object
object
Property | Type | Description |
---|---|---|
name | string | |
data? | VisionEventData[] |
VisionEventData object
object
Property | Type | Description |
---|---|---|
value | number |
userStateTree event
event
This event is emitted whenever the user's state changes. Your callback will be called with a UserStateTree object.
Example
streamlabsOBS.v1.Vision.userStateTree(userStateTree => {
});
userState event
event
This event is emitted whenever the user's state changes. Your callback will be called with a UserState object.
Example
=streamlabsOBS.v1.Vision.userState(userState => {
});
visionEvent event
event
This event is emitted whenever there is a new Vision event. Your callback will be called with a VisionEventsPayload object.
Example
streamlabsOBS.v1.Vision.visionEvent(visionEventsPayload => {
});
Updated about 15 hours ago