video

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(nodes ...node.Node) *element

New Creates a new video element with optional child nodes Example: video.New() Renders: <video></video>

func PreloadAuto

func PreloadAuto(nodes ...node.Node) *element

PreloadAuto Creates a video element with preload="auto" (loads entire video) Example: video.PreloadAuto() Renders: <video preload="auto"></video>

func PreloadMetadata

func PreloadMetadata(nodes ...node.Node) *element

PreloadMetadata Creates a video element with preload="metadata" (loads only metadata) Example: video.PreloadMetadata() Renders: <video preload="metadata"></video>

func PreloadNone

func PreloadNone(nodes ...node.Node) *element

PreloadNone Creates a video element with preload="none" (no preloading) Example: video.PreloadNone() Renders: <video preload="none"></video>

func RawText

func RawText(content string) *element

RawText Creates a new video element with raw text content as unescaped HTML. Example: video.RawText("Your browser <em>doesn't</em> support video") Renders: <video>Your browser <em>doesn't</em> support video</video>

func RawTextf

func RawTextf(format string, args ...any) *element

RawTextf Creates a new video element with formatted raw text content as unescaped HTML using text.RawTextf. Example: video.RawTextf("Your browser <em>%s</em> support video", "doesn't") Renders: <video>Your browser <em>doesn't</em> support video</video>

func Src

func Src(src string, nodes ...node.Node) *element

Src Creates a new video element with src attribute and optional child nodes Example: video.Src("movie.mp4") Renders: <video src="movie.mp4"></video>

func Static

func Static(content string) *element

Static Creates a new video element with static text content. Example: video.Static("Hello World") Renders: <video>Hello World</video>

func Text

func Text(content string) *element

Text Creates a new video element with text content (fallback text) Example: video.Text("Your browser doesn't support video") Renders: <video>Your browser doesn&#39;t support video</video>

func Textf

func Textf(format string, args ...any) *element

Textf Creates a new video element with formatted text content using text.Textf. Example: video.Textf("Your browser %s support video", "doesn't") Renders: <video>Your browser doesn&#39;t support video</video>

Types

type Element

type Element = element

Element is an exported alias for the private element type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL