Coder Social home page Coder Social logo

laravel-zencoder's Introduction

PLEASE NOTE: This is a copy of the repo found here - https://gitlab.advantage4me.co/opensource/zencoder/. I created this 'fork' for use in my own projects as the previous version hasn't been updated to support Laravel 4.2

Zencoder

A laravel wrapper around the Zencoder API (Current version: v2.2.*)

Table of Contents

Installation

You can install the package for your Laravel 4 project through Composer.

Require the package in your composer.json.

"a4m/zencoder": "1.*"

Run composer to install or update the package.

$ composer update

Register the service provider in app/config/app.php.

'Jaybizzle\Zencoder\ZencoderServiceProvider',

Add the alias to the list of aliases in app/config/app.php.

'Zencoder' => 'Jaybizzle\Zencoder\ZencoderFacade',

Configuration

The packages provides you with some configuration options that are required.

To create the configuration file run this command in your command line app:

$ php artisan config:publish a4m/zencoder

The configuration file will be published here: app/config/packages/a4m/zencoder/config.php.

Usage

This is a simple wrapper around the official api, which means that everything you can do via documented on the official API can be done through Zencoder:: with one exception; Laravel facades do not allow us direct access to the properties so we use accessor functions e.g.

Zencoder::accounts()->create($array);
Zencoder::jobs()->create($array);
Zencoder::jobs()->progress($job_id);
Zencoder::inputs()->details($input_id);
Zencoder::outputs()->details($output_id);
Zencoder::notifications()->parseIncoming();

We also have one more function Zencoder::instance() which simply returns the Zencoder instance allowing these properties to be set e.g.

Zencoder::instance()->jobs->create($array);
Zencoder::instance()->jobs = 'Something Else';

Fetcher

Zencoder comes with a nice little ruby gem that acts as a proxy between their server and your local dev environment which is useful if you are developing behind a firewall since Zencoder cannot access your server to send you the notifications. The issue here of course is that it requires ruby to be installed for it to work.

Being that we are developing with Laravel we might as well leverage the power of PHP so to the rescue comes php artisan zencoder:notifications. Which is a php port of the ruby gem. The port includes all the options that the ruby gem does which can be seen using php artisan zencoder:notifications --help or the detailed documentation via php artisan zencoder:notifications --docs.

For the command to work you are required to setup the receivingUrl in the package configuration file along with the above settings.

Package provided by Advantage4meβ„’ for the OSS community.

laravel-zencoder's People

Watchers

 avatar  avatar

Forkers

gc-mark gc-max

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.