audio

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fallback

func Fallback(fallback string) *element

Fallback Creates a new audio element with fallback text content for unsupported browsers. Example: audio.Fallback("Your browser does not support audio.") Renders: <audio>Your browser does not support audio.</audio>

func New

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

New Creates a new audio element without any initial attributes. Example: audio.New() Renders: <audio></audio>

func PreloadAuto

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

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

func PreloadMetadata

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

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

func PreloadNone

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

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

func Sources

func Sources(sources ...node.Node) *element

Sources Creates a new audio element with multiple <source> child elements. Example: audio.Sources() Renders: <audio></audio>

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