ima-dai-sdk
Integrates the Google Interactive Media Ads (IMA) Dynamic Ad Insertion (DAI) SDK into websites, web apps, mobile apps, or TV apps. Use when: - A video player needs to load and play HLS or DASH streams in web apps, Android apps, iOS apps, tvOS apps, Cast (CAF) receivers, or Roku channels. - The app needs to make use of a Google DAI livestream event asset key, or content source CMS ID, video ID for video on demand. Don't use this skill to load and play a VAST or VMAP URL.
摘要
- 用途
- 协助开发者运用 DAI SDK,在视频应用程序中集成 Google Ad Manager 的服务器端广告插入功能。
- 使用时机
- 当您要为 Ad Manager 的直播或随选视频串流建置或调整播放器时,可依目标平台参照相应的集成指南。
- 输出结果
- 内容提供各平台的集成参考资料,以及涵盖 SDK 设置、事件监听、定时中继数据、串流请求与资源清理的一般流程。
上游变更(1 条,最新收录 2026-08-14)
8f57a0d Adds IMA DAI SDK skill with Web, Android, iOS/tvOS, Roku and ChromeCast guides. 添加 IMA DAI SDK 技能,概述直播与随选视频用途、链接各平台集成指南、列出前置需求,并提供六步骤的一般工作流程。 npx skills add "lettucebo/Skills#v2.2.0@ima-dai-sdk" --full-depth ⚠ v2.2.0 发布后即可使用
IMA DAI SDK
Use the IMA DAI SDK to load HLS or DASH streams into the app for:
- Livestream events configured in Google Ad Manager.
- Video on demand (VOD) content ingested into Google Ad Manager.
Prerequisites
Review the platform-specific integration guides for the target platforms:
Web/HTML5/ReactJs/NodeJs/Angular: Read StreamManager guide for loading stream URL from Google full-service DAI into
<video>element.ChromeCast: Read StreamManager guide for integrating the IMA DAI SDK into a ChromeCast Web Receiver.
Android: Read ImaServerSideAdInsertionMediaSource guide for integrating Media3 Exoplayer IMA extension.
iOS/tvOS: Read IMAStreamRequest guide for playing streams with
AVPlayer.Roku: Read StreamManager guide for implementing DAI on Roku SceneGraph.
Quick start (general workflow)
- Import the SDK
- Initialize the SDK
- Add stream event listeners
- Set up timed metadata forwarding
- Make a stream request
- Clean up SDK resources when the stream fails or the user leaves the stream.