viewfile
method.
This will relive Foswiki from the pure delivery of the media files and instead delegate the actual process of sending over files to
the HTTP server in use.
To embed a video or audio file into Foswiki, just upload it and add
%VIDEO{"myvideo.mp4"}%
to the topic page. You should get something similar to this:
Similarly, add
%AUDIO{"mysong.mp3"}%
to render an audio player for your song as part of the page.
Parameter![]() |
Description | Default |
---|---|---|
"..." | video file to be displayed, or comma-separated list of videos in alternative file formats being presented to the user's browser | |
autoplay | boolean whether the video should immediately start playing when the page containing the %VIDEO macro is loaded | off |
controls | boolean to switch on/off controls of the player | on |
frame | the frame of the video to be extracted as a poster | 0 |
height | height of video player | 240 |
id | HTML id for the video element holding the player | random |
mime | specify mime type of the video file | derived from video file |
poster | url of still image to be displayed as long as the video didn't start playing yet | extracted from video using Foswiki:Extensions/ImagePlugin |
preload | boolean whether the player should pre-load the beginning of the video when the page is loaded | off |
rotate | degrees to which the video should be rotated; this comes in handy when videos have been uploaded from a mobile camera | 0 |
skin | name of the skin used for the player: "default", "ted" or "wmp" | default |
start | seconds when to start the video | 0 |
stretch | configure stretching of video geometry | responsive (unless a width and/or height are specified) |
topic | topic to look for the video file | current topic |
width | width of video player | 320 |
Parameter | Description | Default |
---|---|---|
"..." | audio file to be displayed | |
topic | topic to look for the audio file | current topic |
preload | boolean whether the player should pre-load the beginning of the audio file when the page is loaded | off |
autoplay | boolean whether the audio should immediately start playing when the page containing the %AUDIO macro is loaded | off |
start | seconds when to start the audio | 0 |
skin | name of the skin used for the player: "default", "ted" or "wmp" | default |
cd /path/to/foswiki perl tools/extension_installer <NameOfExtension> installIf you have any problems, or if the extension isn't available in
configure
, then you can still install manually from the command-line. See https://foswiki.org/Support/ManuallyInstallingExtensions for more help.
Name | Version | Description |
---|---|---|
Foswiki::Plugins::JQueryPlugin | >=9.20 | Required |
Foswiki::Plugins::ImagePlugin | >=5.00 | Required |
Foswiki::Contrib::XSendFileContrib | >=3.00 | Optional |
13 Jan 2024: | added start parameter |
25 Jan 2024: | added missing css file |
15 Jan 2024: | update to mediaelement-7.0.2 |
23 Aug 2022: | update to mediaelement-5.0.5 |
27 Oct 2020: | update to mediaelement-4.2.16; don't hard-code defaults for width and height; new stretch parameter |
18 Nov 2019: | upgraded to latest version of mediaelement.js; removed support for flash and silverlight |
05 Mar 2018: | added missing png file |
13 Sep 2017: | only initialized video and audio elements of type .jqMediaElement |
01 Dec 2016: | upgraded to mediaelement-2.23.4; use Foswiki::Func api to read files (oops) |
02 Sep 2016: | updated to latest release of mejs |
12 Dec 2014: | initial release |