Skip to content

feat: Pause mediaContentTimeSpent calculation on ad breaks#787

Merged
jaissica12 merged 6 commits into
developmentfrom
feat/adBreakPause
Jan 13, 2026
Merged

feat: Pause mediaContentTimeSpent calculation on ad breaks#787
jaissica12 merged 6 commits into
developmentfrom
feat/adBreakPause

Conversation

@jaissica12
Copy link
Copy Markdown
Contributor

Background

  • Per this doc, Currently, the mParticle Media SDK requires developers to manually manage content time tracking during ad breaks, creating additional complexity and potential for error. If not managed appropriately, the media content time spent value is overstated with ad break time. This PR adds an (optional) ability to allow pausing mediaContentTimeSpent when an Ad Break starts and ends

What Has Changed

  • Added a true/false flag (false by default) on the mediaSession init level that when true, mediaContentTimeSpent will be paused when an Ad Break starts and ends, otherwise when false, the mediaConentTimeSpent will stay the same as is

Screenshots/Video

  • {Include any screenshots or video demonstrating the new feature or fix, if applicable}

Checklist

  • I have performed a self-review of my own code.
  • I have made corresponding changes to the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have tested this locally.

Additional Notes

  • same feature will be added to iOS, Android and Roku media SDKs

Reference Issue (For employees only. Ignore if you are an outside contributor)

@jaissica12 jaissica12 changed the title Feat/ad break pause feat: Pause mediaContentTimeSpent calculation on ad breaks Dec 8, 2025
Comment thread src/types.ts Outdated
Comment thread test/session.test.ts Outdated
Comment thread test/session.test.ts Outdated
Comment thread test/session.test.ts Outdated
Copy link
Copy Markdown
Member

@rmi22186 rmi22186 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comments for tests

@jaissica12 jaissica12 requested a review from rmi22186 December 15, 2025 17:01
@jaissica12 jaissica12 merged commit 0502b88 into development Jan 13, 2026
8 checks passed
github-actions Bot pushed a commit that referenced this pull request Jan 13, 2026
# [1.5.0](v1.4.10...v1.5.0) (2026-01-13)

### Features

* Pause mediaContentTimeSpent calculation on ad breaks ([#787](#787)) ([0502b88](0502b88))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants