hashandsalt / kirby3-video
Kirby 3 视频嵌入插件
0.1.2
2023-06-07 13:43 UTC
Requires
README
这是一个用于在文本区域内部渲染视频播放器的 Kirby 标签和代码片段,以及一个用于新编辑器字段的自定义块(需要 Kirby 3.5)。
商业用途
此插件免费,但如果您将其用于商业项目,请考虑以下操作:
安装
下载
下载并将此存储库复制到 /site/plugins/kirby3-video
。
Composer
composer require hashandsalt/kirby3-video
使用方法
最小化
(vidembed: yourfile.mp4 poster: yourposter.jpg)
您可以设置自己的代码片段来自定义播放器代码
(vidembed: yourfile.mp4 poster: yourposter.jpg snippet: yoursnippet)
在插件文件夹中查看示例代码片段。
以下内容可用于在代码片段中使用
$video // file object for the video file $videourl // URL of the video file $poster // file object for the poster image file $posterurl // URL of the poster image file $width // Video Width $height // Video height $class // Container class $vidclass // Video tag class $preload // Preload attribute $caption // Set a caption for under the video $controls // Controls attribute $title // Video Title $alt // Poster Alt tag
编辑器块
插件现在包括编辑器块(需要 Kirby 3.5+)。
将 -localvideo
添加到您的块列表中以使用它。
已知问题
插件使用 ->file()
- 注意,如果找不到所需的文件,这将使用页面上的第一个图像或第一个视频。这是设计上的。
许可证
MIT