An open API service indexing awesome lists of open source software.

https://github.com/jopacicdev/vidinfo

Fetch video info via oembed urls for YT/Vimeo
https://github.com/jopacicdev/vidinfo

oembed php

Last synced: 3 months ago
JSON representation

Fetch video info via oembed urls for YT/Vimeo

Awesome Lists containing this project

README

          

# VidInfo - Oembed Video Info
[![Build Status](https://travis-ci.org/jopacicdev/vidinfo.svg?branch=master)](https://travis-ci.org/jopacicdev/vidinfo)

Vidinfo package takes `$url` parameter and returns video info via oembed urls from the following service providers:

- YouTube
- Vimeo

# Install via Composer
```sh
$ composer require josip/vidinfo
```

### Usage

Use it in static fashion:

```php
\Josip\Vidinfo\Vidinfo::getVideoInfo($url)
```
in order to return array or JSON string, add in the optional second argument:

```php
\Josip\Vidinfo\Vidinfo::getVideoInfo($url, $returnType)
```

The `$returnType` var can be: `object`, `array`, `json`. Falls back to `array`.

License
----

Free as in *free* beer.