Skip to content

feat(Ads): Allow replaying already-played linear ads in MediaTailor#10266

Merged
avelad merged 5 commits into
shaka-project:mainfrom
hiratariq:ads-disable-played-linear-ad-skip
Jul 1, 2026
Merged

feat(Ads): Allow replaying already-played linear ads in MediaTailor#10266
avelad merged 5 commits into
shaka-project:mainfrom
hiratariq:ads-disable-played-linear-ad-skip

Conversation

@hiratariq

Copy link
Copy Markdown
Contributor

Problem

MediaTailorAdManager.checkLinearAds_ unconditionally force-skips any already-played linear ad (video.currentTime = endTime). Apps have no way to replay a linear ad or implement custom skip logic.

Fixes #10265

Solution

Two opt-in AdsConfiguration boolean configs, both defaulting to false:

Config Effect
disablePlayedLinearAdSkip Stops auto-skip of already-played linear ads so they replay normally
disableTrackingForPlayedLinearAds Suppresses network tracking beacons on replay

@google-cla

google-cla Bot commented Jun 25, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

By default the MediaTailor SSAI path force-skips any already-played linear
ad (video.currentTime = endTime). Add an opt-in ads config,
disablePlayedLinearAdSkip, that lets played linear ads replay so the app
can drive its own skip behavior. Defaults to false, so existing behavior is
unchanged.
Add an opt-in ads config that suppresses tracking beacons
(impression/quartile/start/complete) when a previously-played linear ad
replays. Only the network beacons are suppressed; player UI lifecycle
events continue to fire. Meaningful together with disablePlayedLinearAdSkip.
Defaults to false.
Remove technology-specific qualifiers from the property descriptions to
keep them concise and avoid unknown cspell words.
@hiratariq hiratariq force-pushed the ads-disable-played-linear-ad-skip branch from 32b42f0 to 7afcbf5 Compare June 25, 2026 06:57
@avelad avelad added type: enhancement New feature or request component: ads The issue involves the Shaka Player ads API or the use of other ad SDKs priority: P3 Useful but not urgent labels Jun 25, 2026
@avelad avelad added this to the v5.2 milestone Jun 25, 2026
Comment thread externs/shaka/player.js
@shaka-bot

shaka-bot commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Bundle Size Report for PR #10266

File HEAD Base Diff
controls.css 38.4 KiB (6.7 KiB) 38.4 KiB (6.7 KiB) 0.0 KiB
controls.modern.css 30.5 KiB (6.1 KiB) 30.5 KiB (6.1 KiB) 0.0 KiB
demo.compiled.debug.js 265.8 KiB (53.8 KiB) 265.6 KiB (53.8 KiB) +0.2 KiB
demo.compiled.js 265.8 KiB (53.8 KiB) 265.6 KiB (53.8 KiB) +0.2 KiB
demo.css 160.2 KiB (25.7 KiB) 160.2 KiB (25.7 KiB) 0.0 KiB
demo.modern.css 144.1 KiB (24.7 KiB) 144.1 KiB (24.7 KiB) 0.0 KiB
locales.js 44.1 KiB (10.9 KiB) 44.1 KiB (10.9 KiB) 0.0 KiB
receiver.compiled.debug.js 151.1 KiB (24.4 KiB) 151.1 KiB (24.4 KiB) 0.0 KiB
receiver.compiled.js 151.1 KiB (24.4 KiB) 151.1 KiB (24.4 KiB) 0.0 KiB
shaka-player.compiled-es2021.debug.js 1285.6 KiB (318.6 KiB) 1285.4 KiB (318.6 KiB) +0.2 KiB
shaka-player.compiled-es2021.js 682.0 KiB (228.9 KiB) 681.8 KiB (228.8 KiB) +0.2 KiB
shaka-player.compiled.debug.js 1568.5 KiB (361.0 KiB) 1568.3 KiB (360.9 KiB) +0.2 KiB
shaka-player.compiled.js 791.0 KiB (258.5 KiB) 790.8 KiB (258.5 KiB) +0.2 KiB
shaka-player.dash-es2021.debug.js 955.4 KiB (241.5 KiB) 955.3 KiB (241.5 KiB) +0.1 KiB
shaka-player.dash-es2021.js 478.4 KiB (163.9 KiB) 478.3 KiB (163.8 KiB) +0.1 KiB
shaka-player.dash.debug.js 1164.5 KiB (273.1 KiB) 1164.4 KiB (273.1 KiB) +0.1 KiB
shaka-player.dash.js 557.3 KiB (185.0 KiB) 557.3 KiB (185.0 KiB) +0.1 KiB
shaka-player.experimental-es2021.debug.js 1679.2 KiB (405.0 KiB) 1679.0 KiB (405.0 KiB) +0.2 KiB
shaka-player.experimental-es2021.js 939.0 KiB (299.9 KiB) 938.8 KiB (299.9 KiB) +0.2 KiB
shaka-player.experimental.debug.js 2028.6 KiB (456.9 KiB) 2028.4 KiB (456.9 KiB) +0.2 KiB
shaka-player.experimental.js 1071.6 KiB (335.5 KiB) 1071.4 KiB (335.5 KiB) +0.2 KiB
shaka-player.hls-es2021.debug.js 978.9 KiB (245.5 KiB) 978.8 KiB (245.5 KiB) +0.1 KiB
shaka-player.hls-es2021.js 506.5 KiB (172.8 KiB) 506.5 KiB (172.8 KiB) +0.1 KiB
shaka-player.hls.debug.js 1192.0 KiB (277.6 KiB) 1191.9 KiB (277.6 KiB) +0.1 KiB
shaka-player.hls.js 588.3 KiB (195.3 KiB) 588.2 KiB (195.3 KiB) +0.1 KiB
shaka-player.transmuxer-worker.debug.js 190.2 KiB (46.5 KiB) 190.2 KiB (46.5 KiB) -0.0 KiB
shaka-player.transmuxer-worker.js 83.5 KiB (28.4 KiB) 83.5 KiB (28.4 KiB) 0.0 KiB
shaka-player.ui-es2021.debug.js 1597.0 KiB (387.5 KiB) 1596.8 KiB (387.5 KiB) +0.2 KiB
shaka-player.ui-es2021.js 898.9 KiB (288.3 KiB) 898.7 KiB (288.2 KiB) +0.2 KiB
shaka-player.ui.debug.js 1916.3 KiB (435.4 KiB) 1916.1 KiB (435.3 KiB) +0.2 KiB
shaka-player.ui.js 1019.9 KiB (321.4 KiB) 1019.7 KiB (321.3 KiB) +0.2 KiB

@shaka-bot

Copy link
Copy Markdown
Collaborator

Incremental code coverage: 22.22%

Comment thread demo/config.js
@avelad avelad requested a review from matvp91 June 29, 2026 13:59
@avelad avelad merged commit 221e581 into shaka-project:main Jul 1, 2026
46 of 50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: ads The issue involves the Shaka Player ads API or the use of other ad SDKs priority: P3 Useful but not urgent type: enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MediaTailor linear ads are unconditionally force-skipped after first play

4 participants