--- title: "Ad integration" slug: "vpe-tv-ads" updated: 2026-09-17T09:22:36Z published: 2026-09-17T09:22:36Z canonical: "guide.ncloud-docs.com/vpe-tv-ads" stale: true --- > ## Documentation Index > Fetch the complete documentation index at: https://guide.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # Ad integration Available in Classic and VPC This guide explains how to integrate Google IMA (Interactive Media Ads) with the TV SDK. ## Native build configuration (required) To use Google IMA ads, you need to enable the native build flag. ### tvOS(ios/Podfile) For tvOS, add the following flag to your Podfile. ``` $RNVideoUseGoogleIMA = true ``` Configure the settings and run pod install. ### Android TV(android/gradle.properties) For Android TV, add the following flag to gradle.properties. ``` RNVideo_useExoplayerIMA=true ``` Caution You must rebuild the app after changing the flags. Metro hot reload does not apply the change. ## Ad settings Set the VAST/VMAP ad tag using the `options.ads` property. ``` { switch (event.type) { case 'adStart': console.log('Ad started'); break; case 'adComplete': console.log('Ad completed'); break; case 'adSkip': console.log('Ad skipped'); break; case 'adError': console.log('Ad error', event.data); break; } }} onBack={() => navigation.goBack()} /> ``` ## Ad behavior IMA ad behavior works as follows: - Automatically hides the control bar and ignores remote control input during ad playback. - Uses the native IMA SDK to render the ad UI. - Content automatically resumes after ad completion, skip, or error. ## Ad events You can receive the following ad events: | Event | Description | | --- | --- | | `adStart / adStarted` | Ad started | | `adComplete` | Ad completed | | `adSkip / adSkipped` | Ad skipped | | `adError` | Ad error | | `adLoaded` | Ad loaded | | `adBreakStart` / `adBreakEnd` | Ad break started/ended |