drmonkeyninja / cakephp-video-helper
CakePHP helper for embedding YouTube and Vimeo videos
Installs: 60 841
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 6
Open Issues: 5
Type:cakephp-plugin
Requires
- cakephp/cakephp: ~3.0
- dev-master
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0.0
- 2.x-dev
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.1
- 2.1.0
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6.2
- 2.0.6.1
- 2.0.6.0
- 2.0.5.1
- 2.0.5.0
- 2.0.4.1
- 2.0.4.0
- 2.0.3.0
- 2.0.2.0
- 2.0.1.0
- 2.0.0.0
- dev-docs/loading-helper
- dev-feature/showinfo
- dev-feature/add-showinfo-option-to-youtube
- dev-bug/large-youtube-thumbnail
- dev-bug/travisci-fix
- dev-dev
This package is auto-updated.
Last update: 2024-11-06 22:47:28 UTC
README
This plugin provides a Video helper that generates the tags for embedding videos from Youtube, Vimeo, Dailymotion, BBC player and Wistia.
Requirements
The master
branch has the following requirements:-
- CakePHP 3.0.0 or greater.
- PHP 5.3.0 or greater.
VideoEmbed for CakePHP 2.x
If you want VideoEmbed for your 2.x application, you can use the latest 2.x version of the plugin (see the 2.x
branch).
Installation
This plugin can be installed using Composer:-
composer require drmonkeyninja/cakephp-video-helper:3.*
Alternatively copy the plugin to your app/Plugin directory and rename the plugin's directory 'VideoEmbed'.
Then add the following line to your bootstrap.php to load the plugin.
CakePlugin::load('VideoEmbed');
Usage
echo $this->Video->embed($video['Video']['url'], array(
'width' => 450,
'height' => 300,
'failSilently' => true // Disables warning text when URL is not recognised
));
// Advanced usage
echo $this->Video->embed($video['Video']['url'], array(
'width' => 450,
'height' => 300,
'allowfullscreen' => 1,
'loop' => 1,
'color' => '00adef',
'show_title' => 1,
'show_byline' => 1,
'show_portrait' => 0,
'autoplay' => 1,
'frameborder' => 0
));
Some of these settings are applicable only to Vimeo if the video is on Youtube, Dailymotion or Wistia they are ignored.