Also try to keep audio and video files small, i.e. don't try to upload rather long media files to Foswiki trying to play them back using MediaElement.js.
It is recommended to secure your attachments using Foswiki:Extensions/XSendFileContrib and not using Foswiki's nativeviewfile
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 | |
topic | topic to look for the video file | current topic |
mime | specify mime type of the video file | derived from video file |
width | width of video player | 320 |
height | height of video player | 240 |
controls | boolean to switch on/off controls of the player | on |
preload | boolean whether the player should pre-load the beginning of the video when the page is loaded | off |
autoplay | boolean whether the video should immediately start playing when the page containing the %VIDEO macro 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 |
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 |
frame | the frame of the video to be extracted as a poster | 0 |
id | HTML id for the video element holding the player | random |
skin | name of the skin used for the player: "default", "ted" or "wmp" | default |
Parameter | Description![]() |
Default |
---|---|---|
"..." | audio file to be displayed | |
autoplay | boolean whether the audio should immediately start playing when the page containing the %AUDIO macro is loaded | off |
preload | boolean whether the player should pre-load the beginning of the audio file when the page is loaded | off |
skin | name of the skin used for the player: "default", "ted" or "wmp" | default |
topic | topic to look for the audio file | current topic |
You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.
Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".
If you have any problems, or if the extension isn't available inconfigure
, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help.
Author(s): | Michael Daum | ||||||||||||
Copyright: | © 2010-2014, John Dyer http://j.hn, © 2014 Michael Daum http://michaeldaumconsulting.com | ||||||||||||
License: | GPL (Gnu General Public License) | ||||||||||||
Release: | 1.00 | ||||||||||||
Version: | 1.00 | ||||||||||||
Change History: | |||||||||||||
12 Dec 2014: | initial release | ||||||||||||
Dependencies: |
|
||||||||||||
Home page: | Foswiki:Extensions/MediaElementPlugin | ||||||||||||
Support: | Foswiki:Support/MediaElementPlugin |