Youtube Player Ad

An example of a Youtube Player Ad using AdYoutubePlayer component.

Last updated: December 17, 2025

Ad
Music Vibes
Ad1234567 subscribers
🎵 Never Gonna Give You Up - Rick Astley\n\nThe classic hit that defined an era! Subscribe for more timeless classics and new releases.\n\n🎧 Join our Music Community:\n• Weekly live sessions\n• Behind the scenes content\n• Exclusive artist interviews\n• Early access to new releases\n\n🌟 Hit subscribe and turn on notifications!

Usage example

For initial setup instructions, please refer to the getting started guide.

A simple way to implement Youtube Player Ad preview component with an example code block:

import { AdYoutubePlayer } from "@apisurf/react-ad-preview";

<AdYoutubePlayer
  videoId="dQw4w9WgXcQ"
  profileName="Music Vibes"
  subscribers={1234567}
  content="🎵 Never Gonna Give You Up - Rick Astley\n\nThe classic hit that defined an era! Subscribe for more timeless classics and new releases.\n\n🎧 Join our Music Community:\n• Weekly live sessions\n• Behind the scenes content\n• Exclusive artist interviews\n• Early access to new releases\n\n🌟 Hit subscribe and turn on notifications!"
/>;

Props Interface

The AdYoutubePlayer component accepts the following props:

interface AdProps {
  videoId: string; // The YouTube video ID (e.g., "dQw4w9WgXcQ")
  profileName: string; // The channel or profile name
  content: string; // The ad content/description
  subscribers: number; // Number of subscribers
}
Edit on GitHub
Was this helpful?