DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:vshare

Video Share Plugin

Compatible with DokuWiki

  • 2020-07-29 "Hogfather" yes
  • 2018-04-22 "Greebo" unknown
  • 2017-02-19 "Frusterick Manners" unknown
  • 2016-06-26 "Elenor Of Tsort" unknown

plugin Easily embed videos from various Video Sharing sites like YouTube or Vimeo.

Last updated on
2021-06-25
Provides
Syntax
Repository
Source
Conflicts with
dailymotion

This plugin allows you to embed video players from various video sharing sites. New services can be added by just editing a config file. This is not for displaying local video files.

Download and Install

Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

Usage/Syntax

The basic syntax looks like this: {{videosite>videoid?parameter1&parameter2|title}}

  • Where videosite is one of the identifiers listed in Supported Services chapter
  • and videoid is the identifier of the video at the respective site
  • The parameters are optional. You start these with a ? and separate more of them by a &. Look in Parameters chapter
  • The title is optional as well. Look in Examples chapter
  • The video can be aligned by adding spaces on the left or right inside the curly brackets (like in the image syntax). Look in Examples chapter

A toolbar button pops up a prompt where you can simply paste the full URL to the page of the video you want to embed. The plugin will then try to figure out the video ID by itself. For some services you may need to paste a special URL. See the table below.

Parameters

When embedding a video you should add a size parameter.

You can either give it in the form:

  • widthxheight like 500×300
  • or use the keywords small, medium or large
  • you can also use the keywords full or half to have the video adjust to the available screen width (either 100% or 50% width)

All additional parameters will be passed on as-is to the video service. Refer to their documentation for what is available. There are also hints in the table below.

Examples

Display a YouTube Video:

{{youtube>L-WM8YxwqEU}}

Show a larger player:

{{youtube>L-WM8YxwqEU?large}}

Right-align the player:

{{ youtube>L-WM8YxwqEU}}

Show a small, centered player:

{{ youtube>L-WM8YxwqEU?small }}

Show a small, centered player with a title (look for right space!):

{{ youtube>L-WM8YxwqEU?small |Some funny video}}

Some other additional parameters are supported (depending on video service) as well:

{{youtube>L-WM8YxwqEU?small&start=30&end=45|A random segment of 15 seconds}}

Supported Services

Copy paste the video url in the toolbar pop-up prompt to generate the syntax

Identifier Website Comments Supported parameters
youtube YouTube start, end, rel, autoplay
vimeo Vimeo autoplay
slideshare Slideshare paste the Wordpress shortcode startSlide
dailymotion Daily Motion start
twitchtv Twitch.tv chapter_id, initial_time
archiveorg Archive.org
soundcloud SoundCloud
niconico NicoNico
break Break
bitchute BitChute
coub Coub
odysee Odysee LBRY paste the embed or download URL
youku Youku unclear if working
bilibili bili bili
msoffice unclear if working
msstream unclear if working

For other video sharing sites not supported by vshare, particularly those using PeerTube, you could use the oEmbed plugin to embed videos and other medias

Configuration

When enabling the gdpr option, videos will not be embedded right away. Instead the user needs to click on the embed first. This will embed the video.

Enabling the debug option enables the syntax macro ~~vshare-debug~~. Using that macro in a page, will embed a video from each of the configured video sites. This makes it easy to check that all services still work as expected. It is probably only useful for developers.

Adding new services

New services can easily be added by editing the sites.ini file in the plugin's main directory. Each service expects the following settings:

url The URL that will be loaded into an iframe, should contain at least @VIDEO@ placeholder which will be replaced by the video ID.
vid A public sample video ID used for testing
web The full URL to the website for the video identified by vid above
emb An optional special URL to use for extracting the vid, sometimes needed when the VideoID is only available in special URLs
rex A regular expression that can extract the vid from the web or ''emb' url. It has to contain a single capturing group. It's used in the toolbar mechanism
nfo An option hint on how to find the right URL to paste, currently not used anywhere

Pull requests providing this data are welcome.

Changes

plugin/vshare.txt · Last modified: 2022-02-03 22:37 by andi

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki