alchemy/embed-bundle
Composer 安装命令:
composer require alchemy/embed-bundle
包简介
Embed resources bundle
README 文档
README
Installation
Add embed bundle to Phraseanet:
composer require alchemy/embed-bundle:^2.0.0
Deploy embed players in Phraseanet assets path:
gulp build-alchemy-embed
Configuration
configuration options for phraseanet in config/configuration.yml
| property | type | description |
|---|---|---|
| video.player | string | active player, embed bundle ship with videojs and flowplayer |
| video.autoplay | boolean | autoplay as default behavior |
| video.message_start | string | StartOfMessage as default behavior , where 'StartOfMessage' is a field created from Phraseanet admin |
| video.cover_subdef | string | define a subdefinition for video cover, default is thumbnail |
| video.available_speeds | number[] | playback available speeds |
| audio.player | string | active video player, embed bundle ship with videojs |
| audio.autoplay | boolean | autoplay as default behavior |
| audio.cover_subdef | string | define a subdefinition for audio cover, default is thumbnail |
| document.enable_pdfjs | boolean | use pdfjs instead of flexbox for pdf only |
| document.player | string | active document player, embed bundle ship with flexbox |
yaml example:
embed_bundle:
video:
player: videojs
autoplay: false
message_start: StartOfMessage
cover_subdef: previewx4
available_speeds:
- 1
- '1.5'
- 3
audio:
player: videojs
autoplay: false
cover_subdef: thumbnail
document:
player: flexpaper
enable_pdfjs: true
Field mapping
Video captions (subtitles and chapters) can be added via Phraseanet Fields setup: field name matching table:
| field name | vtt kind | description |
|---|---|---|
| VideoTextTrack | subtitle | will add a subtitle track with a label named default |
| VideoTextTrackFR | subtitle | will add a subtitle track with a label named fr |
| VideoTextTrack* | subtitle | will add a subtitle track with a label named with field name placeholder |
| VideoTextTrackChapters | chapters | will add a chapter track - require JSON content |
VTT file formats
Subtitles valid field content
WEBVTT
1
00:00:00.000 --> 00:00:04.000
This is a sample subtitle track <b>with</b> formating
Chapter 2
00:00:04.000 --> 00:00:08.000
As you can see, that's <c.highlight>easy</c>
Chapters valid field content
WEBVTT
Chapter 1
00:00:00.000 --> 00:00:04.000
{
"title":"Chapter 1",
"image":"asset/img/chapter_1.png"
}
Chapter 2
00:00:04.000 --> 00:00:08.000
{
"title":"Chapter 2",
"image":"asset/img/chapter_2.png"
}
alchemy/embed-bundle 适用场景与选型建议
alchemy/embed-bundle 是一款 基于 TypeScript 开发的 Composer 扩展包,目前已累计 620 次下载、GitHub Stars 达 2, 最近一次更新时间为 2016 年 09 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 alchemy/embed-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 alchemy/embed-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 620
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 12
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-09-21