Statistics
1824
8
0
148d
Badges
Tags
api
Dependencies

Nextras YoutubeApi

Downloads this Month Stable version

Installation

Use composer:

$ composer require nextras/youtube-api

Usage

$reader = new Nextras\YoutubeApi\Reader('<your google-api key>')
$video = $reader->getVideoByUrl('<youtube url>');

echo $video->title;
echo $video->duration; // in sec
echo $video->description;
echo $video->url;
echo $video->embed;
foreach ($video->thumbs as $thumb) {
    echo $video->url; 
}

License

MIT. See full license.

  • v3.0.0 3.0.0

    New major version 3.0.0 is out! 🍇 What's changed from 2.0?

    • minimal version is PHP 5.6 (BC break!)
    • internal change: switched form Kdyby/Curl to GuzzleHttp (BC break!) Thanks @Trejjam
    • internal change: switched from Kdyby/CurlCaBundle to Composer/CaBundle (BC break!)
    • see full commit changelog

Is this addon outdated? Did you find an issue? Please report it.

Componette Componette admin@componette.com