Skip to content

Fix #1297: configurable rewarded completion timeout - #1306

Closed
mdanylov-sigma wants to merge 2 commits into
masterfrom
fix/1297_configurable_reward_timeout
Closed

Fix #1297: configurable rewarded completion timeout#1306
mdanylov-sigma wants to merge 2 commits into
masterfrom
fix/1297_configurable_reward_timeout

Conversation

@mdanylov-sigma

@mdanylov-sigma mdanylov-sigma commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Makes the previously hard-coded 120s RewardedConfig.defaultCompletionTime publisher-configurable via a new rewardedCompletionTimeout property on VideoControlsConfiguration (default 120, matching prior behavior), with pass-throughs on RewardedAdUnit, MediationBaseInterstitialAdUnit, and a new direct property on InterstitialController.

Closes #1297

Behavior

  • Rejects negative values safely (logs a warning, keeps the previous value) rather than throwing or silently accepting bad state.
  • Propagates through both DisplayView.loadAd() and InterstitialController.loadAd() into RewardedConfig.defaultCompletionTime before the transaction factory is created.
  • Used only as a fallback for the endcard/banner rewarded-completion timer (PBMHTMLCreative.setupRewardTimerIfNeeded) when the bid omits endcardTime/bannerTime — it does not affect the primary VAST video reward-completion path (playback-event/percentage based), which is unrelated and untouched.

Testing

  • PrebidMobileTests (unit): 22/22 passed, including new tests:
    • testRewardedCompletionTimeout (default/override/negative-rejection)
    • testInterstitialControllerPropagatesRewardedCompletionTimeout — exercises InterstitialController.loadAd() end-to-end and asserts rewardedConfig.defaultCompletionTime reflects the configured value.
    • testDisplayViewPropagatesRewardedCompletionTimeout — same for DisplayView.loadAd().
    • testRewardEvent_EndcardUsesConfiguredFallback

API / compatibility

  • RewardedConfig.defaultCompletionTime changes letvar: additive, non-breaking for Objective-C consumers.
  • New TimeInterval properties are plain @objcMembers-compatible, consistent with existing config surface.

@OlenaPostindustria

Copy link
Copy Markdown
Collaborator

Also, worth adding the new property to public docs

@OlenaPostindustria OlenaPostindustria left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@YuriyVelichkoPI YuriyVelichkoPI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Blocked since there is a way to implement the requested functionality without changes in the SDK:
#1297 (comment)

@mdanylov-sigma

Copy link
Copy Markdown
Collaborator Author

The supported rwdd passthrough and setImpORTBConfig approach is now documented in prebid/prebid.github.io#6697. I have left this SDK PR open because the latest review rejects the SDK API itself, so closing or withdrawing it requires an explicit decision.

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.

Rewarded end card locks the user for ~120 seconds when the bid omits the rewarded configuration (rwdd) — fallback is hardcoded and not configurable

3 participants