Statocles::Plugin::VideoTag - Change video file anchors to video elements
version 0.0400
# site.yml site: class: Statocles::Site args: plugins: video_tag: $class: Statocles::Plugin::VideoTag $args: file_type: 'youtu' width: 500 height: 300
Statocles::Plugin::VideoTag changes video file anchor elements to video elements.
Statocles::Plugin::VideoTag
The file type to replace.
Default: mp4
mp4
Width of the iframe for an embedded YouTube video.
Default: 560
560
Height of the iframe for an embedded YouTube video.
Default: 315
315
Whether to have a frameborder on the iframe for a YouTube video.
Default: 0
0
The iframe allow attribute string for a YouTube video.
Default: accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture
accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture
Whether to allow full-screen for the iframe for a YouTube video.
Default: 1
1
$page = $plugin->video_tag($page);
Process the video links on a Statocles::Page.
If the file_type is given as youtu, YouTube links of this exact form will be converted to an embedded iframe:
youtu
https://www.youtube.com/watch?v=abcdefg1234567
Where the abcdefg1234567 is a placeholder for the actual video.
abcdefg1234567
* Currently, including a YouTube start time (e.g. &t=42) in the link is not honored. In fact including any argument other than v will not render the embedded video correctly at this time.
&t=42
v
Register this plugin to install its event handlers. (This method is called automatically.)
Statocles
Statocles::Plugin
Statocles::Plugin::AudioTag
https://ology.github.io/2020/12/06/making-a-statocles-plugin/
Gene Boggs <gene@cpan.org>
This software is copyright (c) 2022 by Gene Boggs.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Statocles::Plugin::VideoTag, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Statocles::Plugin::VideoTag
CPAN shell
perl -MCPAN -e shell install Statocles::Plugin::VideoTag
For more information on module installation, please visit the detailed CPAN module installation guide.