setDataToOverlay
Controls overlay behavior. Set this field to answer a will-appear event or to queue the Hello World test overlay.
Will-appear reply
Your answer to an overlay's will-appear: whether it may appear, and whether it may take focus.
Type
assocArray
| Field | Type | Description |
|---|---|---|
overlayId | string | The overlayId from the will-appear payload. An answer for another overlay is ignored. |
canAppear | boolean | True if the overlay may appear; false skips it. Defaults to the payload's value. |
canFocus | boolean | True if the overlay may take focus, even with the panel open; false shows it without focus. |
Example
sub onMaestroOverlayEvent(event as object)
overlayEvent = event.getData()
if overlayEvent = invalid then return
if overlayEvent.type = "will-appear"
m.maestro.setDataToOverlay = {
overlayId: overlayEvent.payload.overlayId
canAppear: not m.yourDialogIsOpen ' your own UI state
canFocus: false
}
end if
end sub
Notes
- Answer inside your
onOverlayEventobserver. Each overlay is decided once: by your answer, or by the defaults when a timeout passes first. - Without
canFocus, the overlay takes focus only if the default allows it and the panel is closed. - See Overlay Integration.
Test overlay trigger
Queues the Hello World test overlay. Use this to verify overlay integration during development.
Type
assocArray
| Field | Type | Description |
|---|---|---|
showTestOverlay | boolean | True queues the Hello World overlay; false is accepted but does nothing. |
overlayRiveFileUrl | string | Optional. A Rive animation file URL. Accepted but not rendered on Roku — the native Hello World template is always drawn. |
Example
' Your debug key or menu: show the Hello World overlay
sub showMaestroTestOverlay()
m.maestro.setDataToOverlay = { showTestOverlay: true }
end sub
Notes
- Any value with a
showTestOverlaykey is treated as a test request and never as awill-appearreply. - Each request queues a new overlay with a unique id (
hello_world_test_<uuid>). TheoverlayIdin thewill-appearpayload identifies it, and your channel answers it like any other overlay. - The overlay goes through the normal queue:
will-appearfires, cooldown applies, and analytics are tracked. - It is stamped with the player's timecode, so it passes the live-window check. When overlays are turned off for your site in Maestro, the request is dropped.
- Roku has no Rive runtime;
overlayRiveFileUrlis preserved on the overlay data but the native template is always drawn.