Title: WebVTT
Author: bobbywalters
Published: <strong>2015 年 8 月 19 日</strong>
Last modified: 2017 年 12 月 3 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/webvtt.svg)

# WebVTT

 作者：[bobbywalters](https://profiles.wordpress.org/bobbywalters/)

[下载](https://downloads.wordpress.org/plugin/webvtt.zip)

 * [详情](https://cn.wordpress.org/plugins/webvtt/#description)
 * [评价](https://cn.wordpress.org/plugins/webvtt/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/webvtt/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/webvtt/#developers)

 [支持](https://wordpress.org/support/plugin/webvtt/)

## 描述

Creates any number of HTML5 elements for uploaded WebVTT files for videos displayed
using the `[playlist]` and `[video]` shortcodes.

The uploaded WebVTT file names must follow this convention to be recognized:
 + 
+ + + + ‘.vtt’

With each value described as:

 * `<video file name>` The base file name of the video file (without it’s extension).
 * `<separator>` A normalized single character separator typically a dash `-` to
   match the WordPress name normalization pattern.
 * `<WebVTT track kind>` The kind of text track. The kind is defined by the HTML5
   specification and may be one of:
    - captions
    - chapters
    - descriptions
    - metadata
    - subtitles
 * `<separator>` (defined above)
 * `<language code>` The language of the track text data. This is a lower case 2
   character code that represents the language only part of a full BCP 47 language
   tag. Here’s a listing of available [language codes](http://www.w3schools.com/tags/ref_language_codes.asp)
   for reference.
 * `'.vtt'` The recognized standard file extension for WebVTT files.

As an example, a video file named `'my-video.mp4'` would be able to leverage uploaded
track files named:

 * `'my-video-chapters-en.vtt'` to add English chapters
 * `'my-video-subtitles-en.vtt'` to add English subtitles
 * `'my-video-subtitles-es.vtt'` to add Spanish subtitles

## 屏幕截图

 * [[
 * Upload video and associated VTT files following the naming convention.
 * [[
 * Video being displayed using the `[video]` shortcode with the VTT tracks available.
 * [[
 * Video and VTT attachments display reference links on media library and edit pages.
 * [[
 * Localization support on all screens.

## 安装

 1. Upload entire **webvtt** directory to `/wp-content/plugins/` directory
 2. 通过WordPress的“插件”菜单激活插件
 3. Upload new or see existing VTT files with the correct naming convention become 
    available to HTML5 videos displayed using the `[video]` shortcode

## 常见问题

  Installation Instructions

 1. Upload entire **webvtt** directory to `/wp-content/plugins/` directory
 2. 通过WordPress的“插件”菜单激活插件
 3. Upload new or see existing VTT files with the correct naming convention become 
    available to HTML5 videos displayed using the `[video]` shortcode

  Why aren’t my VTT files available with my video?

The uploaded WebVTT file names must follow this convention to be recognized:
 + 
+ + + + ‘.vtt’

This avoids:

 * the need for a settings page
 * extra meta data fields and trying to keep these in sync
 * having to re-upload a video when a VTT file is changed or updated

Please see the Description section for a full explanation of the VTT file name format.

## 评价

![](https://secure.gravatar.com/avatar/96d07783c5d602819907ca7575dd277c6497fd721fd4cc4197a4471aa2e44471?
s=60&d=retro&r=g)

### 󠀁[Works like suppose to](https://wordpress.org/support/topic/works-like-suppose-to/)󠁿

 [Leo Caseiro](https://profiles.wordpress.org/leocaseiro/) 2016 年 9 月 3 日 1 回复

Don’t need setup! It’s perfect! Exactly what I need

 [ 阅读所有1条评价 ](https://wordpress.org/support/plugin/webvtt/reviews/)

## 贡献者及开发者

「WebVTT」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ bobbywalters ](https://profiles.wordpress.org/bobbywalters/)

[帮助将「WebVTT」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/webvtt)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/webvtt/)，查看[SVN仓库](https://plugins.svn.wordpress.org/webvtt/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/webvtt/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/webvtt/)。

## 更新日志

#### 1.3.2

2016-08-28

 * FIX: Removed unneeded `empty()` calls.

#### 1.3.1

2016-08-28

 * FIX: Updated usage of `empty()` to be compatible with PHP versions prior to 5.5.

#### 1.3.0

2016-08-27

 * NEW: VTTs will now show up when using the `[playlist]` shortcode.
 * FIX: Sanitize video name when querying for VTTs.
 * FIX: Retrieve vide name from URL with query parameters.

Props @leocaseiro.

#### 1.2.0

2015-08-30

 * NEW: Added POT and first translation (Spanish).
 * NEW: Added screenshots of media library and localization support.
 * FIX: Better attachment metadata localization handling in media library view.

#### 1.1.0

2015-08-29

 * NEW: Links between video and VTTs are shown in the media library and on edit 
   pages.
 * NEW: Improved VTT query performance and results can now be cached.
 * NEW: Filter by `Video tracks` in media library to show only VTT attachments.
 * NEW: Using [classes plugin boilerplate](https://github.com/DevinVinson/WordPress-Plugin-Boilerplate).
 * FIX: Cleaned up [PHPCS WordPress standard](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards)
   sniffs.

#### 1.0.1

2015-08-19

 * NEW: Added Screen shots and filled in more readme sections.
 * FIX: Corrected `.vtt` file names in examples.

#### 1.0.0

Initial release.

## 额外信息

 *  版本 **1.3.2**
 *  最后更新：**8 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 3.6.0 或更高版本 **
 *  已测试的最高版本为 **4.9.29**
 *  语言
 * [English (US)](https://wordpress.org/plugins/webvtt/)
 * 标签
 * [HTML5](https://cn.wordpress.org/plugins/tags/html5/)[track](https://cn.wordpress.org/plugins/tags/track/)
   [video](https://cn.wordpress.org/plugins/tags/video/)
 *  [高级视图](https://cn.wordpress.org/plugins/webvtt/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  1 条 5 星评价     ](https://wordpress.org/support/plugin/webvtt/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/webvtt/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/webvtt/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/webvtt/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/webvtt/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/webvtt/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/webvtt/reviews/)

## 贡献者

 *   [ bobbywalters ](https://profiles.wordpress.org/bobbywalters/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/webvtt/)