Skip to main content

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

FieldTypeDescription
overlayIdstringThe overlayId from the will-appear payload. An answer for another overlay is ignored.
canAppearbooleanTrue if the overlay may appear; false skips it. Defaults to the payload's value.
canFocusbooleanTrue 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 onOverlayEvent observer. 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

FieldTypeDescription
showTestOverlaybooleanTrue queues the Hello World overlay; false is accepted but does nothing.
overlayRiveFileUrlstringOptional. 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 showTestOverlay key is treated as a test request and never as a will-appear reply.
  • Each request queues a new overlay with a unique id (hello_world_test_<uuid>). The overlayId in the will-appear payload identifies it, and your channel answers it like any other overlay.
  • The overlay goes through the normal queue: will-appear fires, 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; overlayRiveFileUrl is preserved on the overlay data but the native template is always drawn.