splitbrain / dokuwiki-plugin-vshare Goto Github PK
View Code? Open in Web Editor NEWPlugin to easily embed videos from various video sharing sites into DokuWiki
Home Page: http://www.dokuwiki.org/plugin:vshare
Plugin to easily embed videos from various video sharing sites into DokuWiki
Home Page: http://www.dokuwiki.org/plugin:vshare
vshare Plugin for DokuWiki All documentation for this plugin can be found at http://www.dokuwiki.org/plugin:vshare If you install this plugin manually, make sure it is installed in lib/plugins/vshare/ - if the folder is called different it will not work! Please refer to http://www.dokuwiki.org/plugins for additional info on how to install plugins in DokuWiki. ---- Copyright (C) Andreas Gohr <[email protected]> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. See the COPYING file in your DokuWiki folder for details
This is what I get if I try to install on dokuwiki.
According to this blog post:
https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
Autoplay doesn't actually work unless there is a &mute=1 tag on the embedded video. Can you please add functionality to YouTube videos for the "mute" parameter so my videos can actually start? Thank you
Line 19 of syntax.php needs changing from
function syntax_plugin_vshare(){
to
function __construct(){
The plugin's main div
is inside a p
, which is invalid. The PType should be 'block'.
Add support to http://odysee.com (aka LBRY)
issue only for documentation - already done.
Commit 05f1445
Thanks
Hi,
Could it be possible to embeded PeerTube Video ? PeerTube is a software, the free and decentralized alternative to video platforms developed by Framasoft a French association and backed by Debian. It's base on WebTorrent. You can find some examples here.
Can you please implement the possibility of being able to automatically use the full width without having to give an exact width?
I would like to use '100%' or 'full' (i.e.) like 'small', 'medium' and 'large' to use the full width, regardless of the template used or whether I use columns, etc.
Best regards
docs show syntax for displaying text title for video example - {{ youtube>L-WM8YxwqEU?small |Some funny video}} but this has never worked for me.
There is no support for URLs at hooktube.com
Do you have a plan for responsive site for the vshare?
look at
https://css-tricks.com/NetMag/FluidWidthVideo/Article-FluidWidthVideo.php
I'm working on it and will fork that if I've got something good, otherwise someone else did try it?
The |
referes to all of slideshare\\.net\\/slideshow\\/embed_code\\/
'slideshare': '(?:(?:slideshare\\.net\\/slideshow\\/embed_code\\/|id=)([0-9]+)|(https?\\:\\/\\/www\\.slideshare\\.net\\/(?:[a-zA-Z0-9_\\-]+)\\/(?:[a-zA-Z0-9_\\-]+)))'
In case someone using Doku "Frusterick Manners" and updated this plugin.
You might want to download older stable version to fix you doku. Here it is: https://codeload.github.com/splitbrain/dokuwiki-plugin-vshare/zip/02729804f2aebbd0cb67192b3a435098d1c08535
I have a page with a lot of youTube clips: https://biosignals.berndporr.me.uk/doku.php?id=ecg:gndamp
and the problem has been that the clips were too large on the phone and too small on a PC screen.
I just had a look at the code and the width are hard coded into it.
Suggestion: instead of hard coding the width in it it would be better to do a design which automatically adjusts the width in relative units.
a) for a PC the width about 80% of the screen
b) for a mobile about 99% of the screen
Below this is just a "hack" where basically changes the geometry of the iframe so that it has full width on a mobile and then 80% width on a PC. All that embedded into a div.
.scalewrapper {
padding: 1%
}
/*
* -- TABLET (AND UP) MEDIA QUERIES --
*/
@media (min-width: 40em) {
.scalewrapper {
padding-left: 10%;
padding-right: 10%;
padding-bottom: 5%;
}
}
.videowrapper {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
padding-top: 25px;
height: 0;
}
iframe.vshare__none,
div.vshare__none {
position: absolute;
display: block;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index:0 !important;
}
php fragment from syntax.php
:
$R->doc .= '<div class="scalewrapper"><div class="videowrapper"><iframe ';
$R->doc .= buildAttributes(array(
'src' => $data['url'],
'class' => 'vshare__'.$align,
'frameborder' => 0,
'scrolling' => 'no'
));
$R->doc .= '>'.hsc($data['title']).'</iframe></div></div>';
Basically the iframe is positioned in absolute coordinate system within a div which has fake padding of the right size. Then that's wapped in a div for padding of that div which is then device dependent. I'm sure it can be simplified but as a hack it's OK for now. Happy to do a proper pull request at some point if there is appetite.
Example:
Embedding this clip https://www.twitch.tv/derspendertv/clip/DrabTenderPoultryNerfBlueBlaster results in following HTML-Code:
<div class="vshare__none"><!--[if !IE]> -->
<object width="425" height="239" type="application/x-shockwave-flash" data="/lib/plugins/vshare/redir.php?url=http%3A%2F%2Fwww.twitch.tv%2Fwidgets%2Flive_embed_player.swf%3Fchannel%3DDrabTenderPoultryNerfBlueBlaster%26auto_play%3Dfalse%26start_volume%3D25&hash=c0f8b691b2d0194d6bbb7920fa100dc9">
<!-- <![endif]-->
<!--[if IE]>
<object width="425" height="239" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param name="movie" value="/lib/plugins/vshare/redir.php?url=http%3A%2F%2Fwww.twitch.tv%2Fwidgets%2Flive_embed_player.swf%3Fchannel%3DDrabTenderPoultryNerfBlueBlaster%26auto_play%3Dfalse%26start_volume%3D25&hash=c0f8b691b2d0194d6bbb7920fa100dc9" />
<!--><!-- -->
<param name="channel" value="DrabTenderPoultryNerfBlueBlaster">
<param name="auto_play" value="false">
<param name="start_volume" value="25">
<param name="FlashVars" value="channel=DrabTenderPoultryNerfBlueBlaster&auto_play=false&start_volume=25">
Das <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a> wird benötigt, um diesen Inhalt anzuzeigen.
</object>
<!-- <![endif]-->
</div>
This results in a warning in Chrome that the Wiki-visitor have to activate Flash. But Flash is a dying technic ..
Solution:
Please use the possibilitys twitch allow to embed their clips as described here:
https://dev.twitch.tv/docs/embed/video-and-clips/
I receive the following errors after installing:
Ive read around everywhere that to not make the embedded related videos for youtube show up, you would put "?rel=0". But in Vshare, the "?" is used to separate the videoid and the size. So when i put for example, {{youtube>sdfwfcgr?rel=0}} it doesnt read the rel=0 part.
Since the provacy shield does not work anymore in the EU, we need some kind of consent before showing the video. Isthis possible, @splitbrain ?
https://www.datenschutz-notizen.de/das-urteil-zum-eu-us-privacy-shield-und-seine-auswirkungen-auf-internetseiten-und-cookie-banner-1926622/
==== Cannot Start at ====
Youtube's key sharing feature is to allow videos to start at certain time by adding the syntax ?t=10m25s at the end of their short url. Currently this feature is not supported in Vshare, I think it is important to implement this though.
[moved request from wikipage]
If you get a chance, please add support for embedding BitChute videos. Thanks! :D
Could you add the ability to make a caption to a video (as they are made to the pictures)?
Something like: {{youtube>xxxxxx?small|Caption}}
Hi - I am getting this error message when I follow the instructions for embedding a youtube video. I am also getting a similar message for vimeo.
I am using the DokuWiki Template and the latest version of DokuWiki.
Please help.
Thank you!
When using the youtube link, the video player say's "an error occurred, please try again", is this because of compatibility issues with youtube videos?
hello thanks for the great work
i tried to had google drive feature.
but i get this when trying to had a new link
{{google>undefined?medium}}
in sites.conf i hadded :
google iframe https://drive.google.com/file/d/@VIDEO@/preview
and in site.js :
'google': '\d[0-9A-Za-z]+'
then i touched local.php
but doesn t work
if i inspect the generated code
Plugin not working with latest dokuwiki. Can you fix it? :)
Thx
When using the new toolbar button, a YouTube URL containing "-" at the beginning of the ID is not recognised.
Example :
http://www.youtube.com/watch?v=-8wVxJS8hF8&feature=popular does not work
http://www.youtube.com/watch?v=8wVxJS8hF8&feature=popular works fine
Tested on current DokuWiki 2009-12-25c.
BTW this new button is incredibly useful thank you !
Vimeo has introduced a new security feature: Videos with visibility "private" cannot be shared solely via the video ID. A hash parameter is required. Please see this Vimeo support article.
The video sharing plugin could introduce a "vimeohash" parameter. This value is added to video url of the embedded player (ID?h=HASH)
When applied to the new dokuwiki template, and you hover your mouse over the edit button, a right aligned video disappears and you can't use the edit button.
Sites.conf specifies all URLs using http, which causes display problems when dokuwiki is served over https.
This can be resolved for youtube by removing http:
so the URL begins with //
, causing the browser to request the video using the same protocol as the wiki page.
youtube iframe //www.youtube.com/embed/@VIDEO@
I've only tested with with youtube. I don't know if the other sites listed in sites.conf serve the same content over https.
I am sure many companies use Panopto for their video hosting; I attempted to do it myself but could not get it to work. Note that company would be replaced by the company name.
sites.conf:
**company** iframe https://**company**.hosted.panopto.com/Panopto/Pages/Embed.aspx?id=@VIDEO@&autoplay=false&offerviewer=true&showtitle=true&showbrand=false&start=0&interactivity=all
sites.js
'**company**': 'panopto\\.com/.*[&?]id=([a-z0-9_\\-]+)'
vshare works great, but it depends on a flash player. Most of the video share sites have an IOS (ipad/iphone) optimized player. Is it possible to incorporate these optimized players?
It seems Vimeo changed their player and/or url scheme, I'm seeing "Sorry ...." messages on al my embedded vimeo video's
eg. http://wild-water.nl/dokuwiki/blog/2009/0829_latex_machet_vervangen
anyone have an idea?
For the following services, I need some examples to check if they are correctly configured:
If someone is currently using these with the vshare plugin, please comment with the used syntax here.
The goal is to extend their settings in the sites.ini
to have automated tests.
The following error appears as I click to play in the video: http://prntscr.com/l0hs0c
This is how the video was added:
{{youtube>L-QwsgCnJCwy8&t=735s}}
{{youtube>L-QwsgCnJCwy8&t=735s?small}}
{{youtube>L-QwsgCnJCwy8&t=735s?large}}
Original Link to Video: https://www.youtube.com/watch?v=QwsgCnJCwy8&t=735s
It should be noted that the recent addition of support in this plugin for videos at archive.org breaks the archive feature of the blog plugin. Suggest changing syntax in the vshare plugin from archive to archiveorg
A parameter for HD, such as {{youtube>videoid?large&hd}}. For youtube this would add hd=1 to the URL.
I discovered that niconico has changed it embedding syntax, and vshare can now serve niconico by adding single line in sites.conf:
niconico iframe http://embed.nicovideo.jp/watch/@VIDEO@
As such, I am deprecating my niconico plugin. May you add this line in sites.conf?
Historically the niconico embedding syntax is too obscure that vshare cannot serve it and I had to write my plugin to solve the problem. Since niconico uses now standard iframe instead of obscure code, my plugin has finished the historical role and in favour of using vshare now.
Hi.
It would be great, if this plugin would support twitch.tv. Or is there a workaround?
Most stuff can be retrieved via oembed
http://www.oembed.com/
https://github.com/WordPress/WordPress/blob/master/wp-includes/class-oembed.php
Release 2018-04-22a "Greebo"
vshare plugin 2018-02-05
Browser: Firefox 61.0
On https://openwrt.org/docs/techref/hardware/soldering#videos we have 3 youtube videos embedded via vshare plugin.
When I scroll down the page to reach the Edit button of the section containing the videos, and I hover the mousepointer over the Edit button, the page jumps down and with it the Edit button, making it impossible to edit this section only.
&autoplay
=0 it does not happen, i.e. no page jumping, and normal section editing is workingWould be nice to get rid of that jumping, so that normal section editing works again.
Thanks for looking into this!
Hi
It seems the tool I need. But I have a question. I do not wish to let youtoube know about every site a user open while he is browsing through dokuwiki. Is there an Option to only load the video scripts after clicking on the video like the Shariff Project do it for social media buttons?
Hi,
I have modified my sites.js and sites.conf to support SoundCloud. It would be great if you could add these:
in sites.js, add
'soundcloud': 'soundcloud\\.com(\\d+)'
in sites.conf, add
soundcloud iframe https://w.soundcloud.com/player/?url=http://api.soundcloud.com/tracks/@VIDEO@
You can see it in action at:
http://metasynth.com/wikifarm/metasynth/doku.php?id=blog:2013_06_14_found_image_exploration
(Note that our ISP is having some issues -- so the page may or may not load correctly depending on whether they have sorted things out)
Thanks,
Edward
I think the caption may not be working, but I'm not sure. Here is my wikitext:
{{ youtube>2ovSQ4bl4yM?small&Rel=0 |COB6008 a Racing Cobra }}
This appears to produce the video centred on the screen, but no caption other than the one that Youtube apply.
So I have to write text above the embedded video, but the spacing on the page makes the text look like the caption for the video above it, which is confusing to the user.
I am using Detritus - please let me know if you have any additional info requirements about my setup.
Otherwise, I love the plugin!
bilibili is not working
{{bilibili>L -BV1aR4y1j78Q}}
{{youtube>L-WM8YxwqEU}}
youtube player is working perfectly.
The current way of embedding YouTube videos has changed to be an iframe; is it possible to support this syntax in vshare, please? The main benefit is that it allows serving the video as HTML5, which works on newer browsers without Flash installed.
Thanks.
I translated messages "Video Share Plugin", but they aren't apply. It may be because localization builder don't submit.
File script.js contains link to the button image:
"icon": DOKU_BASE+"lib/plugins/vshare/button.png",
but the image is not displayed (Tested in IE and Opera). When the line is changed to
"icon": "../../plugins/vshare/button.png",
everything is fine.
Hi, i use the latest version of doku wiki and your plugin, but when i use this code
{{youtube>L-8rJhOnQS1Bs}}
Youtube say to me "error occured, please try later"
What can i do ?
Thanks
Every time I play embedded youtube videos, it is played with max volume. It is too loud to listen comfortably. I hope you consider a parameter for volume control.
I tried to embed three YouTube videos in a single line, by aligning them all to left by doing {{youtube>6VnhC8u_d40?small }} {{youtube>j_zeixo-zJY?small }} {{youtube>tFrf0TVnqIQ?small }}
While this seems (?) to work, I see the videos as I expect them to for some moments and then they disappear.
Here's the live version of the same : https://www.ccextractor.org/public:gsoc:gsoc2017:ccaligner_word_by_word_audio_subtitle_synchronisation_saurabh_shrivastava_gsoc_2017
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.