track

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Captions

func Captions(src string) *element

Captions Creates a track element for captions (transcriptions including sound effects for deaf/hard-of-hearing users) Example: track.Captions("closed-captions.vtt") Renders: <track src="closed-captions.vtt" kind="captions" />

func Chapters

func Chapters(src string) *element

Chapters Creates a track element for chapters (navigation cues) Example: track.Chapters("chapter-markers.vtt") Renders: <track src="chapter-markers.vtt" kind="chapters" />

func Descriptions

func Descriptions(src string) *element

Descriptions Creates a track element for audio descriptions (for visually impaired users) Example: track.Descriptions("audio-descriptions.vtt") Renders: <track src="audio-descriptions.vtt" kind="descriptions" />

func Metadata

func Metadata(src string) *element

Metadata Creates a track element for metadata (not displayed to users, used by scripts) Example: track.Metadata("analytics-data.vtt") Renders: <track src="analytics-data.vtt" kind="metadata" />

func New

func New() *element

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

func Subtitles

func Subtitles(src string) *element

Subtitles Creates a track element for subtitles (translations for foreign language content) Example: track.Subtitles("english.vtt") Renders: <track src="english.vtt" kind="subtitles" />

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