fernandovaller/thumbnail
Composer 安装命令:
composer require fernandovaller/thumbnail
包简介
Get the thumbnail of youtube and vimeo videos from the url. The returned information is ID and URL of the thumbnail
关键字:
README 文档
README
Get the thumbnail of youtube and vimeo videos from the url. The returned information is ID and URL of the thumbnail
Installation
Install the latest version with
$ composer require fernandovaller/thumbnail
Basic Usage
<?php use FVCode\Thumbnail\Thumbnail; require __DIR__ . '/vendor/autoload.php'; $th = new Thumbnail(); $url = 'youtube|vimeo URL video'; // The returned information is ID and URL of the thumbnail $data = $th->get($url);
Config
Vimeo videos can have origin restriction, in which case add the setting to simulate the origin in the request.
<?php use FVCode\Thumbnail\Thumbnail; require __DIR__ . '/vendor/autoload.php'; $config = [ 'origin' => 'https://www.google.com' ]; $th = new Thumbnail($config); $url = 'youtube|vimeo URL video'; // The returned information is ID and URL of the thumbnail $data = $th->get($url);
Noembed
<?php use FVCode\Thumbnail\Thumbnail; require __DIR__ . '/vendor/autoload.php'; $th = new Thumbnail(); $url = 'youtube|vimeo URL video'; // The returned information is array [title, thumbnail_url, video_id, ...] $data = $th->getNoembed($url);
统计信息
- 总下载量: 57
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-12-23