<?php
define('WP_USE_THEMES', false);
require('../../../wp-load.php');

echo "=== Testing YouTube Livestream Data ===\n\n";

$profile_url = 'https://www.youtube.com/@NashvilleBirdCam';
$youtube_channel_id = 'UClOWy1mPxNB1D3cpmmxqGEg';

echo "Profile URL: $profile_url\n";
echo "Channel ID: $youtube_channel_id\n\n";

$data = mm_video_get_livestream_data($profile_url, '', $youtube_channel_id);

echo "=== Livestream Data ===\n";
print_r($data);

if (!empty($data['video_id'])) {
    echo "\n✓ video_id found: " . $data['video_id'] . "\n";
} else {
    echo "\n✗ video_id is EMPTY!\n";
}

if (!empty($data['embed_url'])) {
    echo "✓ embed_url found: " . $data['embed_url'] . "\n";
} else {
    echo "✗ embed_url is EMPTY!\n";
}
