Ad Formats
Overlay Ads
Standard IAB display and OTT-style video rendered inside native spatial UI surfaces. No new creative production required — your existing 2D assets run on day one.
How Overlay Ads Work
Overlay placements attach to visionOS windows or Android XR panels as floating surfaces. They render at a fixed position within your app's window group, composited by the OS so they respect depth and occlusion naturally. Creatives are fetched over HTTPS, cached locally, and rendered at full native resolution.
Static or animated image, HTML5 banner, or rich media MRAID unit.
Pre-roll, mid-roll, or companion video. VAST 4.x / VPAID compatible.
Expandable, interstitial, and rewarded units via MRAID 3.0.
Supported Ad Sizes
| Format | Dimensions | Notes |
|---|---|---|
| Banner | 728 × 90 | Horizontal bar at edge of window |
| MREC | 300 × 250 | Standard medium rectangle |
| Full Panel | 1920 × 1080 | Full window takeover |
| OTT Video | 16:9 any | Pre-roll or mid-roll video |
Adding an Overlay Placement
Create a Placement in the dashboard with type Overlay, then use the Placement ID in your app:
import PrismAR
import SwiftUI
struct MainWindow: View {
var body: some View {
ZStack(alignment: .bottom) {
AppContent()
PrismAdView(
placementId: "YOUR_OVERLAY_PLACEMENT_ID",
adSize: .banner // .mrec, .fullPanel, .video
)
.padding(.bottom, 20)
}
}
}import ai.prismar.sdk.PrismAdView
import ai.prismar.sdk.AdSize
@Composable
fun MainScreen() {
Box {
AppContent()
PrismAdView(
placementId = "YOUR_OVERLAY_PLACEMENT_ID",
adSize = AdSize.BANNER, // MREC, FULL_PANEL, VIDEO
modifier = Modifier
.align(Alignment.BottomCenter)
.padding(bottom = 20.dp)
)
}
}Ad Lifecycle Events
Listen to ad events to handle load success/failure and track impressions in your own analytics:
PrismAdView(placementId: "YOUR_PLACEMENT_ID")
.onAdLoaded { impression in
print("Ad loaded: \(impression.id)")
}
.onAdFailed { error in
print("Ad failed: \(error.localizedDescription)")
}
.onAdClicked {
print("Ad clicked")
}