preload

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// None Do not preload any media content. Provides fastest page load time but slower media startup
	// when user initiates playback. Best for bandwidth-constrained environments.
	None = Preload("none")

	// Metadata Preload only metadata (duration, dimensions, first frame). Balanced approach that enables
	// UI setup while conserving bandwidth. Good compromise for most use cases.
	Metadata = Preload("metadata")

	// Auto Preload the entire media file. Provides fastest media startup time but slower initial page
	// load and higher bandwidth usage. Default browser behavior.
	Auto = Preload("auto")
)

Variables for Preload values

Functions

This section is empty.

Types

type Preload

type Preload []byte

Preload Media content preload behavior hint for optimal user experience. Controls how much media content is downloaded in advance to balance startup speed with bandwidth usage.

func Custom

func Custom(value string) Preload

Custom allows setting a custom Preload value for edge cases or future specifications. Use this when the predefined constants don't cover your specific use case.

Jump to

Keyboard shortcuts

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