Extension:EmbedVideo/ru

Расширение EmbedVideo добавляет функцию парсера под названием  для встраивания видеоклипов из более чем 24 популярных сервисов обмена видео во множестве стран и на множестве языков. Он также добавляет обработчики видео и аудио мультимедиа для поддержки преобразования стандартных ссылок на файлы во встроенные теги HTML5  и.


 * Project Homepage
 * Документациия на GitLab


 * Исходный код
 * Исходный код на GitLab


 * Bugs
 * Issues at GitLab


 * Лицензирование
 * EmbedVideo is released under The MIT License.


 * GDPR-conform fork
 * Исходный код на GitHub - focuses on a more privacy centric version of EmbedVideo. Note that only a subset of services are supported and every parser function but  and corresponding service tags are removed.

Media handler
For locally uploaded content the process for displaying it on a page is the same as an image. 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:

— Classic parser tag


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



— Parser tag for templates
The  parser tag allows for key=value pairs which allows for easier templating and readability.

— Parser tag for URLs
The  parser tag is like the   tag, but its first parameter is a URL that will be parsed to determine the service automatically.

— Tag hook
Videos can easily be embedded with the  tag hook. The ID/URL goes as the input between the tags and parameters can be added as the tag arguments.

Alternatively, you can also use the service id as the tag (assuming another extension isn't already using this tag).

Примеры


For example, a video from YouTube uses the  service selector. You can specify either the raw ID: Or specify the full URL:

To display the same video as a right aligned large thumbnail with a description:

For YouTube to have the video start at a specific time code utilize the  (URL arguments) parameter. Take the rest of the URL arguments from the custom URL and place them into the. Please note that not all video services support extra URL arguments or may have different keys for their URL arguments. https://www.youtube.com/watch?v=eAORm-8b1Eg&start=76

URL arguments can be used to chop up a video and loop it: https://www.youtube.com/watch?v=eAORm-8b1Eg&start=160&end=180&loop=1

Support for VideoLink tags
Support for the unmaintained VideoLink extension's tags has been added since version 2.5.

From the original extension documentation:

The VideoLink extension allows embedding of YouTube videos in articles; allowing for multiple linked videos to be played in a single embedded video player, first shown when a user clicks on a video link.

The &lt;evlplayer /&gt; specifies where the player should appear within the page, and the parser function allows creation of links that load a specific video.

— Tag hook for video container
This tag is used to position the video player container within the page.

A default video can be set to fill the container by default instead of default content as well.

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.

Video link examples
Creating a video list allows video links to create a playlist on the fly using the youtube and youtubevideolist service.



Поддерживаемые сервисы
As of version 2.x, EmbedVideo supports embedding video content from the following services:

Конфигурация


История версий

 * 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

Developer notes
The major benefit of using a parser function as the injection mechanism for video clips (as opposed to an extension tag) is that parser functions can utilize template parameters (of the form ). For example, say you found yourself making a lot of YouTube videos in thumbnail size, right-aligned like an image. You might make a template called, which could contain this:

And then call it like this:

Reporting bugs
There is an issue tracker set up on the GitLab project page.

Contributing
Bug reports, feature requests, and patches are always welcome. New contributors can be added to the GitLab project if there is sufficient interest.



См. также

 * Extension:EmbedVideo (fork): Fork of EmbedVideo — A more privacy centric version of this Extension. 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.

Weblinks

 * Fandom Help Wiki /