Audio and video player
Description
This plugin provides simple players for audio and video files. It relies on HTML5 standard elements and does not require Flash or other external browser plugins. The player can be used in a very simple manner (see examples below) and configurated by different parameters.
The plugin is licensed under GPL.
Author: Arvid Zimmermann
Download
Usage examples
- Simple audio player:
[audioplayer=attachs/file.mp3]
- Audio player with additional options:
[audioplayer=attachs/file.mp3 controls="0" autoplay="1" loop="1"]
- Simple video player:
[videoplayer=attachs/file.mp4]
- Video player with additional options:
[videoplayer=attachs/file.mp4 controls="0" autoplay="1" loop="1" width="640" height="480" poster="images/posterimage.jpg"]
Parameters
Each of the following parameters is optional. If not set, the default value will be used. For boolean parameters, the following values count as “true”: true, 1, yes, ja, si.
Both audio and video
- controls: Show control elements of the player (default is yes)
- autoplay: Start playing immediately (default is no)
- loop: Play in endless loop (default is no)
Video only
- width: The width of the video's display area (default is the width of the video itself)
- height: The height of the video's display area (default is the height of the video itself)
- poster: The poster frame image to show until the user plays or seeks (default is the video's first frame). Must be an uploaded image file.
HTML+CSS
The player will be displayed as <audio> / <video> element with the CSS class “audiovideo”. See the documentation of these standard HTML5 elements for further details. The given parameters (see above) will be set to the player element accordingly.
Development
Feel free to send Pull Requests on Codeberg: https://codeberg.org/azett/flatpress_audiovideo
Changelog
2022-10-11: Version 1.0.2
- Bugfix: Fixed some PHP warnings.
2020-12-19: Version 1.0.1
- Bugfix: initializePluginTags() has to be public static.
2017-08-12: Version 1.0
- Initial plugin version.