getCurrentEventIDs
Returns all event IDs for the current session.
Overview
Use this method to retrieve every event ID loaded in the current session. It works consistently in both single- and multi-event sessions, always returning string[].
- Single-event session — returns a one-element array containing the active event ID.
- Multi-event session — returns all active event IDs in the same order they were passed to
userDidStartWatchingEvent. - No active session — returns an empty array.
This is the preferred API over getCurrentEventID when you need to handle multi-event sessions, because the return type is always string[] with no conditional branching required.
Method Signature
getCurrentEventIDs(): string[];
Parameters
This method takes no parameters.
Return Value
An array of active event ID strings. Empty when no session is active.
Example
const eventIds = SDK.getMaestroEventViewModel().getCurrentEventIDs();
if (eventIds.length === 0) {
console.log('No active session.');
} else {
console.log('Active event IDs:', eventIds);
}
Notes
- Order matches the
eventIdarray passed touserDidStartWatchingEvent. - In a single-event session, the array contains exactly one element.
- See
getCurrentEventIDfor the legacy single-value accessor.