camera

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetProvider

func SetProvider(p Provider)

func StartStream

func StartStream(opts map[string]any) error

func StopStream

func StopStream() error

Types

type PhotoData

type PhotoData struct {
	Data   []byte `json:"data"`
	Format string `json:"format"`
}

func CapturePhoto

func CapturePhoto() (*PhotoData, error)

type Provider

type Provider interface {
	CapturePhoto() (*PhotoData, error)
	StartStream(opts map[string]any) error
	StopStream() error
}

Provider is a native camera backend. On mobile the shell registers one via SetProvider (CameraX on Android, AVFoundation on iOS). On desktop the webview's getUserMedia is the intended capture path, so the JS bridge falls back to it when no provider is set.

Jump to

Keyboard shortcuts

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