Skip to content

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

Merged
rubenberttpingol merged 1 commit into
developfrom
fix/proof_of_play_with_stats_switched_off
Nov 11, 2026
Merged

rubenberttpingol merged 1 commit into
developfrom
fix/proof_of_play_with_stats_switched_off

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 merged commit 39267fd into develop Nov 11, 2026
3 of 4 checks passed
@rubenberttpingol
rubenberttpingol deleted the fix/proof_of_play_with_stats_switched_off branch November 11, 2026 10:46
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 11, 2026
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.

2 participants