{source}

<?php

require_once(‘EmbedYoutubeLiveStreaming.php’); // Use this if the class file from repo is in the same directory

$channelId = ‘UCsFhxkZ4gtON8_AqwyHjIwg’; // This is the your CHANNEL ID

$api_key = ‘AIzaSyCKnZBMlbkCZzeFS2twoedGQpr2gi4rXJI’; // This is your google project API KEY with youtube api enabled

$YouTubeLive = new EmbedYoutubeLiveStreaming($channelId, $api_key);

if(! $YouTubeLive->isLive )

{

    echo «There is currently no live streaming for the channel!»;

}

else

{

    echo «There is a live streaming happening right now! See below»;

echo $YouTubeLive->embed_code;

}

?>

{/source}