drmonkeyninja/cakephp-video-helper
最新稳定版本:3.0.3
Composer 安装命令:
composer require drmonkeyninja/cakephp-video-helper
包简介
CakePHP helper for embedding YouTube and Vimeo videos
README 文档
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.
统计信息
- 总下载量: 64.71k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-08-05