ima-dai-sdk
What it does
It shows how to load a livestream or on-demand stream from Google Ad Manager with ads already inserted, across web, Android, iOS, Cast, and Roku. It is for developers building video players with server-side ads.
When to use it
- ✓When you need to play a livestream that has ads inserted by Google Ad Manager.
- ✓When you want to load on-demand video with dynamic ads in a web, mobile, or TV app.
- ✓When your player must support HLS or DASH streams on Android, iOS, Cast, or Roku.
Skill link
https://github.com/google/skills/blob/main/skills/ads/ima-dai-sdk/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Add Google's dynamic ad insertion to my web video player so ads play in my livestream.”
5 new skills a week. 1 minute to read.
How it works
It picks the guide for your platform, imports the SDK, sets up stream listeners and timed metadata, makes the stream request, and cleans up when the stream ends or the viewer leaves.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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.
FAQ
Does it cover client-side ads?
No. Client-side video ads use a different skill, the IMA SDK client-side skill.
Which platforms does it support?
Web, Android, iOS, tvOS, Cast receivers, and Roku.
What do I need from Ad Manager?
Depending on the stream, you need a livestream event asset key, or a content source ID and video ID.
Details
Original description by the author
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.
repo: google/skills
Popularity
- GitHub stars
- 22k
- Ranking position
- #10194
- License
- Apache-2.0
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
finding-google-skills
22kHelps your agent find the right Google guides for a setup task, such as hosting, databases, storage, sign-in or AI model serving.
gcloud
22kHelps your agent write and check Google Cloud gcloud commands, looking up exact syntax before it runs anything so it does not guess flags.
google-cloud-recipe-auth
22kGuides your agent through Google Cloud identity and access, including how people and services sign in and which permissions they get.
google-cloud-recipe-onboarding
22kWalks a new developer through first steps on Google Cloud, including choosing a project, linking billing, and deploying a first resource.
Similar skills
taste-application
280kHelps your agent create videos in a specific style. It can copy the editing rhythm from a reference video, generate new scenes, adjust colors, and edit everything together with other footage.
taste-distillation
280kLets your agent analyze videos to create a style pack. This includes colors, cutting rhythm, and visual elements that can be reused to create new videos with the same look.
ui-demo
280kHas your agent record polished UI demo videos. Useful for creating tutorials or showing how a web app works.