2017 © Pedro Peláez
 

library assetdistribution

PHP component that can publish digital assets (video, audio...) across multiple services. Currently supports YouTube, Vimeo and Dailymotion.

image

libcast/assetdistribution

PHP component that can publish digital assets (video, audio...) across multiple services. Currently supports YouTube, Vimeo and Dailymotion.

  • Sunday, April 24, 2016
  • by bricev
  • Repository
  • 4 Watchers
  • 9 Stars
  • 1,362 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

AssetDistributor

Scrutinizer Code Quality Build Status, (*1)

AssetDistributor is a PHP component that can publish digital assets (video, audio...) across multiple services., (*2)

Currently, AssetDistributor can publish videos across YouTube, Vimeo and DailyMotion. Feel free to help and integrate new Adapters for new services., (*3)

Vocabulary

  • Asset — describes a digital media of one of the following type : audio, document, image or video., (*4)

  • Adapter — implements a service to upload, update or delete Asset objetcs from., (*5)

  • AdapterCollection — contains multiple Adapter objects and is traversable, (*6)

  • Owner — handles an AdapterCollection and the corresponding services account credentials., (*7)

Installation

The component may be added through composer :, (*8)

composer require libcast/assetdistributor

Configuration

All your application oAuth credentials or any other configuration must be stored in a PHP configuration file. You may have a look on example/configuration.ini as an example., (*9)

Usage

First create an Owner called "me" to bear accounts credentials and an AdapterCollection, (*10)

$cache = new \Doctrine\Common\Cache\FilesystemCache('/tmp'); // Doctrine Cache is a dependency
$owner = new Owner('me', $cache);

Then create an Asset from an existing file, (*11)

$asset = AssetFactory::build(
    "$root/tests/video.mp4",        // path to file of a Flysystem\File object
    'My Video',                     // optional title
    'This is an awesome video',     // optional description
    ['test', 'asset-distributor']   // optional array of tags
);
$asset->setVisibility('private');

You may create an AdapterCollection manually:, (*12)

/** @var string $configPath Path to the PHP configuration file */

$adapters = new AdapterCollection;
$adapters[] = new YouTubeAdapter($owner, $configPath);
$adapters[] = new VimeoAdapter($owner, $configPath);

You also can retrieve the AdapterCollection from the cache:, (*13)

$adapters = AdapterCollection::retrieveFromCache($owner, $configPath);

Or you can create an AdapterCollection based on the Asset :, (*14)

$adapters = AdapterCollection::buildForAsset($asset, $owner, $configPath);

Once created, the AdapterCollection must be affiliated to the Owner, (*15)

$owner->setAdapters($adapters);

At this point, you may manipulate your Asset across all services like this:, (*16)

// Upload the Asset on all services
$owner->upload($asset);

$asset->setTitle('Different title');
$asset->addTag('foobar');

// Update the Asset on all services
$owner->update($asset);

// Delete the Asset on all services
$owner->delete($asset);

The Versions

24/04 2016

dev-master

9999999-dev http://libcast.com

PHP component that can publish digital assets (video, audio...) across multiple services. Currently supports YouTube, Vimeo and Dailymotion.

  Sources   Download

MIT

The Requires

 

The Development Requires

24/04 2016

v2.0.1

2.0.1.0 http://libcast.com

PHP component that can publish digital assets (video, audio...) across multiple services. Currently supports YouTube, Vimeo and Dailymotion.

  Sources   Download

MIT

The Requires

 

The Development Requires

06/03 2016

v2.0.0

2.0.0.0 http://libcast.com

PHP component that uploads and manage media from remote social/content platform. Currently handle video for YouTube.

  Sources   Download

MIT

The Requires

 

The Development Requires

06/03 2016

v2.x-dev

2.9999999.9999999.9999999-dev http://libcast.com

PHP component that uploads and manage media from remote social/content platform. Currently handle video for YouTube.

  Sources   Download

MIT

The Requires

 

The Development Requires

20/11 2013

v1.0.0

1.0.0.0 http://libcast.com

PHP component that uploads and manage media from remote social/content platform. Currently handle video for YouTube.

  Sources   Download

MIT

The Requires

 

The Development Requires

08/10 2013

dev-pr/1

dev-pr/1 http://libcast.com

PHP component that uploads and manage media from remote social/content platform. Currently handle video for YouTube.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires