Upload via Git Manager GUI - test-direct-url.php

This commit is contained in:
2026-03-30 18:42:38 +00:00
parent 83bff40565
commit 5008184633

View File

@@ -1,29 +1,29 @@
<?php
define('WP_USE_THEMES', false);
require('../../../wp-load.php');
echo "=== Testing Direct Stream URL ===\n\n";
$profile_url = 'https://www.youtube.com/@NashvilleBirdCam';
$player_url = 'https://www.youtube.com/watch?v=ithwtp7aJlM';
$youtube_channel_id = 'UClOWy1mPxNB1D3cpmmxqGEg';
echo "Profile URL: $profile_url\n";
echo "Player URL: $player_url\n";
echo "Channel ID: $youtube_channel_id\n\n";
$data = mm_video_get_livestream_data($profile_url, $player_url, $youtube_channel_id);
echo "=== Result ===\n";
print_r($data);
echo "\n=== Key Fields ===\n";
echo "Platform: " . ($data['platform'] ?? 'NOT SET') . "\n";
echo "Video ID: " . ($data['video_id'] ?? 'NOT SET') . "\n";
echo "Embed URL: " . ($data['embed_url'] ?? 'NOT SET') . "\n";
if (!empty($data['video_id']) && !empty($data['embed_url'])) {
echo "\n✓ SUCCESS - Both video_id and embed_url are set!\n";
} else {
echo "\n✗ FAILURE - Missing video_id or embed_url\n";
}
<?php
define('WP_USE_THEMES', false);
require('../../../wp-load.php');
echo "=== Testing Direct Stream URL ===\n\n";
$profile_url = 'https://www.youtube.com/@NashvilleBirdCam';
$player_url = 'https://www.youtube.com/watch?v=ithwtp7aJlM';
$youtube_channel_id = 'UClOWy1mPxNB1D3cpmmxqGEg';
echo "Profile URL: $profile_url\n";
echo "Player URL: $player_url\n";
echo "Channel ID: $youtube_channel_id\n\n";
$data = mm_video_get_livestream_data($profile_url, $player_url, $youtube_channel_id);
echo "=== Result ===\n";
print_r($data);
echo "\n=== Key Fields ===\n";
echo "Platform: " . ($data['platform'] ?? 'NOT SET') . "\n";
echo "Video ID: " . ($data['video_id'] ?? 'NOT SET') . "\n";
echo "Embed URL: " . ($data['embed_url'] ?? 'NOT SET') . "\n";
if (!empty($data['video_id']) && !empty($data['embed_url'])) {
echo "\n✓ SUCCESS - Both video_id and embed_url are set!\n";
} else {
echo "\n✗ FAILURE - Missing video_id or embed_url\n";
}