This recipe is superseded by Ape.
Easily embed Youtube, Vimeo and other video clips into your wiki pages.
The recipe is:
- easy to use: introduces no new markup
- future-proof - if the recipe is disabled, the links will continue to work.
Currently the recipe embeds public videos from Youtube, Vimeo and Facebook, future versions will add compatibility with other video sharing websites and with videos attached to the wiki.
- Copy autoplay.jsΔ to your pmwiki/pub directory. Note that the file needs to be named "autoplay.js".
- Add near the end of config.php such code:
To embed a video from Youtube or Vimeo, simply copy the "Share" address of the video and paste it into the wiki page, wrapped with the
%player% ... %% wiki style. You can use all features of links (text, tooltip title, etc.). For example:
%player% http://www.youtube.com/watch?v=HJCczbSF-B8 %% %player% http://youtu.be/HJCczbSF-B8 %% %player% [[http://youtu.be/HJCczbSF-B8|Eben Moglen on Facebook, Google and Government Surveillance]] %% %player% [[http://vimeo.com/59674991|Paris impression]] %%
To embed a public video from Facebook, enter the URL address of the page, eg.:
%player% https://www.facebook.com/photo.php?v=1234567890 %%
You can set the size of the video by setting the width and height of the %player% style:
%player width=100pct height=400px% http://youtu.be/HJCczbSF-B8 %%
No configuration is required.
Change log / Release notes
- 20140408 fix error when the link is not a direct child of the player, reported by RandyB; add support for MSIE 6 and 7 (frame embedding, the actual video support depends on the possibility of the system to stream the video).
- 20140407b fix player dimensions for some browsers, hide link when a player is embedded.
- 20140407 enabled setting of player dimensions.
- 20140406 first public release, ready to be tested.
- Cookbook /
- Ape Embed videos, maps and more in wiki pages (Stable)
- Audio5 HTML5 Audio Support for PmWiki (Stable)
- AutoPlay Unobtrusive embedding of video players from simple links (Superseded by Ape)
- Dailymotion Markup for embedding DailyMotion videos (Stable)
- Flash Embedding Flash movies; plus recipes for embedding Flash from specific sites like YouTube, Vimeo, GoogleVideo, Flickr, Archive.org, and more...
- FlashMediaPlayer Embed flash media players in your pages (Beta)
- Flowplayer Flowplayer recipe (Beta)
- FLVPlayer Embedding of Flash video (.flv) files into wiki pages the easy way. (initial release)
- HTML5Audio Play HTML5 Audio (working)
- Html5AVCtrl Enable youtube-like keyboard and mouse control of HTML5 video and audio.
- HTML5Video Show HTML5 Video (working)
- QuickTime Embed QuickTime content on wiki sites. (Stable)
- Video5 HTML5 Video Support for PmWiki (Stable)
- VideoAttach Handles Attach: videos, provides a video directive and optional support for popular Video Upload sites. (Beta)
- WMPlayer Embedding a Windows Media Player (stable)
Recipe written and maintained by Petko.
See discussion at AutoPlay-Talk