giorgijorji/webvtt-parser
Composer 安装命令:
composer require giorgijorji/webvtt-parser
包简介
PHP library to parse webvtt
README 文档
README
PHP library to parse WebVTT files.
It follows the W3C spec, but it's not complete. For example, it does not have special treatment for CSS styles.
Usage
use Giorgijorji\Webvtt\Parser; use Giorgijorji\Webvtt\ParserException; $parser = new Giorgijorji\Webvtt\Parser(); $content = "WEBVTT\n\n00:00:00.000 --> 01:22:33.440\nHello world\n\n01:22:33.440 --> 01:22:34.440\n<v Eric>Hi again\n"; $result = $parser->parse($content); // [ // "cues" => [ // [ // "voice" => "", // "start" => 0, // "end" => 4953.44, // "text" => "Hello world", // "identifier" => "", // ], // [ // "voice" => "Eric", // "start" => 4953.44, // "end" => 4954.44, // "text" => "Hi again", // "identifier" => "", // ], // ], // ]
统计信息
- 总下载量: 571
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-02-13