Download the PHP package leela/video-api without Composer

On this page you can find all versions of the php package leela/video-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package video-api

VideoApi

API for the video websites such as youtube, Vimeo and dailymotion

Uses Strategy Design Pattern

Begin by installing this package through Composer. Edit your project's composer.json file to require`.

"require": {
"leela/VideoApi": "0.1"
}

Next, update Composer from the Terminal:

composer update

That's it! You're all set to go.

Usage for youtube video details

<?php
$youtubeapi = new \Leela\VideoApi(new \Leela\Services\YouTubeService());
$youtubeapi->getVideoDetails('x2on26a');

Usage for Vimeo video details

<?php
$vimeoapi = new \Leela\VideoApi(new \Leela\Services\VimeoService());
$vimeoapi->getVideoDetails('x2on26a');

Usage for Daily Motion video details

<?php
$dailymotionapi = new \Leela\VideoApi(new \Leela\Services\DailyMotionService());
$dailymotionapi->getVideoDetails('x2on26a');

Methods

1) getVideoDetails($videoId);

$videoId - Video Id of the youtube, Vimeo or the daily motion

Returns array of video details
array(
        'id' => $data->id,
        'title' => $data->title,
        'description' => $data->description,
        'thumbnail_small' => $data->thumbnail->sqDefault,
        'thumbnail_large' => $data->thumbnail->hqDefault,
        'duration' => $data->duration,
        'upload_date' => $data->uploaded,
        'like_count' => isset($data->likeCount) ? $data->likeCount : 0,
        'view_count' => isset($data->viewCount) ? $data->viewCount : 0,
        'comment_count' => isset($data->commentCount) ? $data->commentCount : 0,
        'uploader' => $data->uploader
        );

2)  getPlayer($videoId, $width, $height)
    $videoId  - Required (Video id of the youtube, Vimeo or the dailymotion)
    $width - Optional (width of the player)
    $height - Optional  (height of the player)

Returns the html data of the player

Contributor

Leela Narasimha Reddy - [email protected]

Issues & Suggestions

Please report any bugs or feature requests here: https://github.com/leelanarasimha/VideoApi/issues


All versions of video-api with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package leela/video-api contains the following files

Loading the files please wait ....