ima-sdk-client-side
Supports Interactive Media Ads (IMA) SDK. Use this skill for client-side ad insertion when you are requesting video ads for websites, apps, TVs or other platforms using VAST or VMAP. Do not use for Dynamic Ad Insertion (DAI), SSAI, or SGAI.
摘要
- 用途
- 它协助在数字产品中集成 Google IMA SDK,以请求并管理串流视频与音频广告。
- 使用时机
- 在网站、应用程序、电视或其他平台透过 VAST 或 VMAP 实作用户端广告请求时使用;不适用于 DAI、SSAI 或 SGAI。
- 输出结果
- 它提供涵盖 SDK 设置、广告请求、加载与播放事件及错误处理,以及 AdsManager 清理的一般流程,并提供平台专属指南供实作参考。
上游变更(5 条,最新收录 2026-08-11)
80513f4 Renames IMA SDK basics skill from ima-sdk-basics to ima-sdk-client-side. 将技能重命名为 `ima-sdk-client-side`,修订其 IMA 用户端说明,并将中继数据版本从 1.0.0 升至 1.0.1。 703f8d2 Move ads skills from per-product subdirectories to top-level skills/ads/ directory. 将技能文件从 `interactive-media-ads` 子目录移至 `skills/ads/ima-sdk-basics`,未变更文件内容。 c75b500 Restructure the YAML frontmatter in all SKILL.md files to nest the 'category' field under the 'metadata:' block. The 'category' field is used to organize the skills in the README.md 在技能中继数据下添加 `category: GoogleAds`,并移除了标题前的空白行。 28d90a3 Add new skill for Interactive Media Ads SDK basics. 添加 `ima-sdk-basics` 技能,说明 IMA 用户端的使用方式、链接各平台指南,并概述一般广告集成流程。 npx skills add "lettucebo/Skills#v2.2.0@ima-sdk-client-side" --full-depth ⚠ v2.2.0 发布后即可使用
IMA SDK client-side
The Google IMA SDK (Interactive Media Ads) lets you load in-stream video and audio ads into websites, apps, TVs and other digital platforms. Use an IMA SDK to request ads from any VAST-compliant ad server and manage ad playback.
Prerequisites
Before integrating the IMA SDK, you must read the platform-specific guide below to support all platforms that your app can support:
- Web/HTML5/ReactJs/NodeJs/Angular: Read all these guides ima-sdk-web-guide.md, ima-sdk-web-iframe-mode.md, ima-sdk-web-mobile-safari.md
- Android/AndroidTV/ReactNative: Read ima-sdk-android-guide.md
- iOS/tvOS/ReactNative: Read all these guides ima-sdk-ios-guide.md, ima-sdk-tvos-guide.md
Quick start (general workflow)
- Import the SDK: Prerequisites, dependencies.
- Initialization: Early setup, Warmup, Settings Configuration, and Ad UI Setup.
- Ad Request: Creating and triggering the request, User gesture compliance.
- Ad Load Success/Failure: Handling the load event to get the AdsManager, or handling early fatal errors.
- Ad Playback Events: Listening to playback events via AdsManager to coordinate content play/pause, and handling non-fatal LOG events and fatal active playback errors.
- Cleanup: Properly destroying the AdsManager to release resources and prevent memory leaks.
For detailed, platform-specific implementation details, always refer to the guides in the Prerequisites section.