This Flutter Video Ads example shows how to embed ads within video playback using Flutter Ads SDK. Ideal for streaming apps, media platforms, and content-driven experiences.
Embedded video ads provide seamless monetization by integrating ads directly into video streams without disrupting user experience.

Video Embedded Ad Preview
Video ads are integrated directly into media playback. They can appear before, during, or after content, ensuring higher visibility and better engagement compared to static formats.
Ensure video ads are available before playback or insertion.
await FlutterAds.instance.ensureAdsAvailable(
adType: AdType.videoEmbedded,
context: context, // Required only if enableAutoFetch() has NOT been called
);
// Creates a video player that automatically inserts ads
// at configured time intervals during playback.
FlutterAds.instance.getVideoPlayerWithEmbeddedAdsWidget(
videoUrl,
testMode: true,
heightConstraint: MaxHeightConstraint(400),
);
Customize overlay UI, controls, and layout behavior.
VideoEmbeddedAdStylingModel(
logoSize: 30,
actionStyle: TextStyle(color: Colors.white, fontSize: 10),
footerTileStyle: AdListTileStyle(
tileHeight: 45,
tileTitleAlignment: MainAxisAlignment.spaceEvenly,
tileElementsAlignment: CrossAxisAlignment.center,
tileColor: Colors.black.withValues(alpha: 0.1),
titleTextStyle: TextStyle(color: Colors.white, fontSize: 11),
subtitleTextStyle: TextStyle(color: Colors.white, fontSize: 10),
),
overlayColor: Colors.black.withValues(alpha: 0.1),
onOverlayColor: Colors.white,
)