Template:HLSVideo: Difference between revisions
From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
Jump to navigationJump to search
Create HLS video player template for IPFS-hosted videos (via create-page on MediaWiki MCP Server) |
Simplify template to use Common.js gadget instead of inline scripts (via update-page on MediaWiki MCP Server) |
||
| Line 9: | Line 9: | ||
* '''cid''' - Required. The IPFS CID containing the HLS directory (must have master.m3u8) | * '''cid''' - Required. The IPFS CID containing the HLS directory (must have master.m3u8) | ||
* '''width''' - Optional. Video width (default: 100%) | * '''width''' - Optional. Video width (default: 100%) | ||
* ''' | * '''max-width''' - Optional. Maximum width (default: 800px) | ||
=== Example === | === Example === | ||
{{HLSVideo|cid=QmXet6QwZ7qdtDn89Kn4fzdm7LugpcmQoSzchdij4V3DLB}} | {{HLSVideo|cid=QmXet6QwZ7qdtDn89Kn4fzdm7LugpcmQoSzchdij4V3DLB}} | ||
</noinclude><includeonly><div class="hls-video- | </noinclude><includeonly><div class="hls-video-player" data-cid="{{{cid}}}" data-width="{{{width|100%}}}" data-max-width="{{{max-width|800px}}}"></div></includeonly> | ||
</div></includeonly> | |||
Revision as of 23:07, 19 February 2026
HLS Video Player
Embeds an HLS video from IPFS using hls.js.
Usage
{{HLSVideo|cid=QmXet6QwZ7qdtDn89Kn4fzdm7LugpcmQoSzchdij4V3DLB}}
Parameters
- cid - Required. The IPFS CID containing the HLS directory (must have master.m3u8)
- width - Optional. Video width (default: 100%)
- max-width - Optional. Maximum width (default: 800px)