Skip to content

Fix: Proof of Play recorded with stats switched off - #148

Closed
rubenberttpingol wants to merge 1 commit into
developfrom
rubenberttpingol/xlr-enablestat-147
Closed

rubenberttpingol wants to merge 1 commit into
developfrom
rubenberttpingol/xlr-enablestat-147

Conversation

@rubenberttpingol

Copy link
Copy Markdown
Contributor

Fixes #147

XLR reported Proof of Play for every layout and widget, including ones with stats switched off. The CMS writes enableStat into the layout file as "0" or "1". XLR read it with Boolean(getAttribute('enableStat') || false), and Boolean("0") is true.

Changes

  • Layout (Layout.ts) and media (Media.ts) now read the attribute as getAttribute('enableStat') === '1', the same way Media.ts already reads cyclePlayback and isRandom.
    • "1" is on. "0" or no attribute is off.
  • Overlay layouts extend Layout, so they're covered too.

Testing

  • npm run build passes, and the built bundle contains the new check in both places.
  • Not yet tested in a running player. That needs a player build on this XLR version, a layout or widget with stats switched off, and a check that no START_STAT/END_STAT events are posted for it.

Read enableStat as '1', so "0" no longer counts as enabled.

Fixes #147
@rubenberttpingol rubenberttpingol self-assigned this Nov 10, 2026
@rubenberttpingol
rubenberttpingol deleted the rubenberttpingol/xlr-enablestat-147 branch November 10, 2026 13:36
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 10, 2026
@rubenberttpingol

rubenberttpingol commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Replaced by #149 after renaming the branch to fix/proof_of_play_with_stats_switched_off.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant