Skip to main content

setDataToPanel

Generic method to be used as a form of passing data specific to each panel

Overview

Pushes external data into a specific panel. The panel name and interface will have to be an exact match to the SDK's definition.

Method Signature

setDataToPanel(panelData: Record<string, any>): void;

Usage

const eventViewModel = await SDK.userDidStartWatchingEvent({...});
eventViewModel.setDataToPanel({
// .i.e. chat, shopify, image, etc.
[panelType]: {
overrideUrl: 'https://...',
customProperty: 'value'
},
});

Panel-Specific Data Formats

whatJustHappened

Passes data to the event recap panel.

FieldTypeDescription
triggerModulebooleanWhen true, manually triggers the overlay notification to appear, regardless of whether a key moment has been surfaced automatically.
dismissModulebooleanWhen true, dismisses the overlay notification on demand. Use this when player states make the overlay unwelcome — for example, when native player UI opens, an ad break starts, or the app navigates away. The dismissed note is suppressed so it does not immediately re-appear, but later notes continue to surface normally. This is a silent no-op when nothing is showing or the SDK has not been initialized. If both dismissModule and triggerModule are true in the same payload, dismissModule takes precedence and the overlay is dismissed.
// Trigger the overlay manually
eventViewModel.setDataToPanel({
whatJustHappened: {
triggerModule: true,
},
});

// Dismiss the overlay on demand (e.g. when an ad break starts)
eventViewModel.setDataToPanel({
whatJustHappened: {
dismissModule: true,
},
});

Best Practices

  • Validate data structure before passing it to the panel.
  • Ensure the panel is configured and available.
  • The panel will only react to the data if the SDK was designed to do so.