YouTube Embed Test

Platform: YouTube

Testing: YouTube IFrame API player detection and event tracking (play, pause, progress, complete)

Video Information

Video ID: dQw4w9WgXcQ

Title: Rick Astley - Never Gonna Give You Up

Embed Type: IFrame with JS API enabled

SDK Detection: Looks for window.YT global object, iframe patterns matching youtube.com or youtube-nocookie.com, or elements with [data-video-id] / .youtube-player

YouTube IFrame API

The YouTube IFrame API allows JavaScript control:

// Load the API
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
document.head.appendChild(tag);

// On API ready
function onYouTubeIframeAPIReady() {
  player = new YT.Player('ytplayer', {
    events: {
      'onStateChange': onPlayerStateChange
    }
  });
}