Require the bundle in your composer.json file:
$ composer require aciliainternet/video-provider-bundle --no-update
Register the bundle:
// app/AppKernel.php
public function registerBundles()
{
return array(
new Acilia\Bundle\VideoProviderBundle\AciliaVideoProviderBundle(),
// ...
);
}
Install the bundle:
$ composer update aciliainternet/video-provider-bundle
Add the initialize arguments of selected provider to your config.
- ThePlatform:
# parameters.yml
video_provider_bundle.provider_init_args:
user: provider_user
password: *****
Configure video provider:
# parameters.yml
video_provider_bundle.provider: ThePlatform
Allowed providers:
- ThePlatform (Default)
// Get the service
$videoProvider = $this->get('acilia.video_provider');
// Call methods not covered by the interface
$videoProvider->call('setAccount', ['FIC Fox Play PT LF']);
// Get a video by ID
$video = $videoProvider->getVideoInfo('22070341236');
// Get videos from feed
$videos = $videoProvider->getVideosFromFeed('40xNZWrzTq0v');