Ads & Monetization
This section documents ad break configuration, monetization flows, and rollout considerations.
For complete ProMamoPlayer setup and prop coverage, start with Pro Player.
Where to configure ads
- Use
adsfor simulated ad breaks (preroll, midroll, postroll), skip behavior, andoverlayInset. - Use
imafor ad-tag-based serving (VAST/IMA). - See Analytics & Events for tracking
ad_start,ad_complete, andad_error.
AdsConfig
type AdsConfig = {
adBreaks: Array<{
type: 'preroll' | 'midroll' | 'postroll';
time?: number;
source: {
uri: string;
type?: 'video/mp4' | 'application/x-mpegURL';
};
}>;
skipButtonEnabled?: boolean;
skipAfterSeconds?: number;
overlayInset?: {
right?: number;
bottom?: number;
};
};
overlayInset.right: right padding for ad label/skip button cluster.overlayInset.bottom: bottom padding for ad label/skip button cluster.
For end-to-end examples using both ads and ima, see Pro Player.