Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[interactive_media_ads] Adds support for mid-roll ads #7407

Merged
merged 32 commits into from
Sep 17, 2024

Conversation

bparrishMines
Copy link
Contributor

@bparrishMines bparrishMines commented Aug 14, 2024

Adds ContentProgressProvider and adds AdsRequest.contentProgressProvider field.

This changes the platform interface AdsRequest to PlatformAdsRequest, so the PlatformContentProgressProvider can be passed to it. And the app-facing AdsRequest can take a ContentProgressProver.

Fixes flutter/flutter#154261

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added the p: interactive_media_ads Plugin for IMA SDK label Sep 10, 2024
@@ -79,13 +80,18 @@ base class AndroidAdsLoader extends PlatformAdsLoader {
}

@override
Future<void> requestAds(AdsRequest request) async {
Future<void> requestAds(PlatformAdsRequest request) async {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The platform implementations haven't been exposed yet, so this shouldn't be a breaking change.

@bparrishMines bparrishMines changed the title Ima midrolls [interactive_media_ads] Adds support for mid-roll ads Sep 11, 2024

if (_adsManager != null) {
_contentProgressTimer = Timer.periodic(
const Duration(milliseconds: 500),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@harold1208 @stuartmorgan What are your thoughts on the interval to be used here in the example? This works for me on Android and iOS, but this is a Flutter specific workaround to handle the SDK running on a separate thread.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For context, this timer updates the SDK of the progress of the content video with this being the interval between updates.

Choose a reason for hiding this comment

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

Per our offline discussion with the IMA team, a 200ms interval would be the ideal value.

@bparrishMines bparrishMines marked this pull request as ready for review September 11, 2024 18:43
Copy link

@harold1208 harold1208 left a comment

Choose a reason for hiding this comment

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

Per our offline discussion with the IMA team, a 200ms interval would be the ideal value to poll content progress.

Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

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

LGTM once the 500->200 change is made.

@bparrishMines bparrishMines added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 17, 2024
@auto-submit auto-submit bot merged commit c7406b3 into flutter:main Sep 17, 2024
76 checks passed
@bparrishMines bparrishMines deleted the ima_midrolls branch September 17, 2024 21:17
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 18, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Sep 18, 2024
flutter/packages@4f2b9cd...c7406b3

2024-09-17 [email protected] [interactive_media_ads] Adds support for mid-roll ads (flutter/packages#7407)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App p: interactive_media_ads Plugin for IMA SDK platform-android platform-ios
Projects
None yet
Development

Successfully merging this pull request may close these issues.

interactive_media_ads mid-rolls/ad breaks/In-Stream ads support
3 participants