| 开发者 | balajant |
|---|---|
| 更新时间 | 2026年6月12日 20:54 |
| PHP版本: | 7.0 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv3 or later |
| 版权网址: | 版权信息 |
[amsv_video] shortcode/wp-content/plugins/ directory.Use the [amsv_video] shortcode in any post or page. The only required parameter is streamId.
Basic example:
[amsv_video streamId="lesson1"]
Advanced example:
[amsv_video streamId="lesson1" poster="https://example.com/poster.jpg" autoplay="0" controls="1" preload="metadata" ttl="1800" width="640" height="360"]
Audio example:
[amsv_video streamId="audiobooks/mybook/chapter01.mp3"]
streamId (required): The stream ID from Ant Media Server. Can include .mp4 or .m3u8 extensionposter (optional): URL to poster imageautoplay (optional): Set to "1" to autoplay (default: "0")controls (optional): Set to "1" to show controls (default: "1")preload (optional): Preload behavior - "none", "metadata", "auto" (default: "metadata")ttl (optional): Custom token TTL in seconds (overrides global setting)width (optional): Video width in pixels or with unit like "100%", "640px" (optional)height (optional): Video height in pixels or with unit like "360px", "50%" (optional)controlsList (optional): Controls to hide - "nodownload", "nofullscreen", "noremoteplayback" (default: "nodownload")class (optional): Custom CSS classes to add to the video elementThe plugin generates a JWT token using your configured Secret Key. This token is appended to the HLS stream URL and all subsequent segment requests, ensuring that only authorized viewers can access the content.
class attribute for custom CSS classes on the video elementcontrolsList attribute with nodownload defaultstreamId are now stripped for JWT token generationwidth: 100% — width is only set when explicitly specifiedaudio tag