Extension:EmbedVideo/zh

EmbedVideo 扩展添加了一个名为  的解析器函数，用于嵌入来自多种语言和国家/地区的超过 24 种流行视频共享服务的视频剪辑. 它还添加了视频和音频媒体处理程序，以支持将标准的 文件链接转换为嵌入式 HTML5  和  标记.


 * 项目首页
 * GitLab上的文档


 * 在GitLab上的源代码
 * 在GitLab上的源代码


 * 程序错误
 * GitLab 的问题


 * 许可协议
 * EmbedVideo在The MIT License下发布.

用法


媒体处理程序
对于本地上传的内容，将其显示在页面上的过程与图像相同. See the image syntax documentation for complete reference on this feature.

This example would display a video in page using a HTML5 tag.



To specify the start and end timestamps in the media use the start and end parameters. The timestamp can be formatted as one of: ss, :ss, mm:ss, hh:mm:ss, or dd:hh:mm:ss.



标签
The EmbedVideo parser function expects to be called in any of the following ways:



— 经典解析器标签


However, if needed optional arguments may be left blank by not putting anything between the pipes:





— 模板的解析器标签
The  parser tag allows for key=value pairs which allows for easier templating and readability.



— URL 的解析器标记
The  parser tag is like the   tag, but its first parameter is a URL that will be parsed to determine the service automatically.



— 标签钩子
视频可以用的标签钩子轻松嵌入. ID/URL作为标记之间的输入，参数可以作为标记参数添加.

或者，您也可以使用服务id作为标记（假设另一个扩展尚未使用此标记）.



-{zh-hans:示例; zh-hant:範例;}-


例如，来自 YouTube 的视频使用  服务选择器. 您可以指定原始 ID： 或者指定完整的网址：

要将同一视频显示为右对齐的大缩略图，并附有说明，请执行以下操作：

要让视频在特定时间代码开始，请使用 （网址参数）参数. 从自定义 URL 中获取其余的 URL 参数，并将它们放入  中. 请注意，并非所有视频服务都支持额外的网址参数，或者其网址参数可能有不同的键. https://www.youtube.com/watch?v=eAORm-8b1Eg&start=76

URL 参数可用于剪切视频并循环播放： https://www.youtube.com/watch?v=eAORm-8b1Eg&start=160&end=180&loop=1



视频标签的支持
自版本 2.5 起，添加了对未维护的视频标签扩展程序标签的支持.

从原始扩展文档中：

视频链接扩展允许在文章中嵌入YouTube视频;允许在单个嵌入式视频播放器中播放多个链接的视频，当用户单击视频链接时首次显示.

指定播放器应在页面中出现的位置， 解析器函数允许创建加载特定视频的链接.



— 视频容器的标签钩子
此 标记用于在页面中定位视频播放器容器.

默认情况下，可以将默认视频设置为填充容器，而不是默认路径.

An important caveat to make note of, is that the  and   attributes only effect the video that is being included into the container, and not the actual container. For styling of the container, please use the  or   attributes.

— Parser function for video links
In addition to all of the attributes supported by the  tag, these specific attributes apply to the   (and  ) tags. To maintain backwards compatibility, if you do not define a  then   is assumed.



视频链接示例
Creating a video list allows video links to create a playlist on the fly using the youtube and youtubevideolist service.



支持的服务
从版本 2.x 开始，EmbedVideo 支持从以下服务嵌入视频内容：

配置


版本历史

 * v2.9.0
 * Fix stored XSS in AudioTransformOutput and VideoTransformOutput.
 * Fix autoResize on mobile.
 * Fix video caption escaping the container.
 * Handle multiple video sizes per page in resize.
 * Move beam service to mixer.
 * Add a default link title for #evl/#vlink.
 * Add spotify playlist embeds.
 * Add facebook video embeds.
 * Fix centering of videos.
 * Add Microsoft Stream service.
 * Add title to iframes.
 * Add API help messages for 1.33 compatibility.
 * Fix static analysis issues.
 * Fix Twitch embeds.


 * v2.8.0
 * Renamed hitbox.tv to smashcast.tv.
 * Updated Nico Video embed code.
 * Added support for Twitch clips.
 * Fix issues with Twitch VODs.
 * Removed unused $wgFFmpegLocation that was interferring with TimedMediaHandler.
 * Added Polish translation.


 * v2.7.4
 * Added support for playlist to evlplayer
 * Added support for youtube video list
 * Updated Documentation for evlplayer
 * Added missing dependency for evlplayer in extension.json


 * v2.7.3
 * Default Twitch VOD to autoplay=false by default
 * Allow videos to be sized in 1:1 aspect ratios for special use cases.


 * v2.7.2
 * Added feature to evlplayer to allow default video content


 * v2.7.1
 * Fixed issue with youku videos not embedding properly on https enabled wikis.


 * v2.7.0
 * Added SoundCloud support
 * Added ability to use service name as a parser tag (if not defined previously)


 * v2.6.1
 * Added new configuration options to disable adding media handlers and file extensions.
 * https://gitlab.com/hydrawiki/extensions/EmbedVideo/issues/76
 * Fixed an uninitialized array.
 * https://gitlab.com/hydrawiki/extensions/EmbedVideo/issues/77
 * Fixed undefined indexes in the AudioHandler class.
 * https://gitlab.com/hydrawiki/extensions/EmbedVideo/issues/78
 * Fixed class properties that were unintentionally declared as static.
 * https://gitlab.com/hydrawiki/extensions/EmbedVideo/issues/75
 * Fixed RTL language issues with CSS.
 * https://gitlab.com/hydrawiki/extensions/EmbedVideo/pull/73



发行说明
使用解析器函数作为视频剪辑的注入机制（与扩展标记相对）的主要好处是解析器函数可以利用模板参数（形式为 ）. 例如，假设您发现自己制作了许多缩略图大小的YouTube视频，像图像一样右对齐. 您可以创建一个名为  的模板，其中可能包含以下内容：

然后这样称呼它：



报告问题
There is an issue tracker set up on the GitLab project page.

贡献
欢迎错误报告、功能请求和补丁. New contributors can be added to the GitLab project if there is sufficient interest.



参见

 * Extension:EmbedVideo (fork): 嵌入式视频的分支 — 此扩展的更注重隐私的版本. Note that only a subset of services are supported, but new services can be requested through GitHub. Moreover every parser function but   and the parser tags like,  etc. are removed.

网页链接

 * 同人圈帮助维基 /