screencapture

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package screencapture keeps a screen out of screenshots and recordings: for a card number, say, or a one-time code.

nimbus native plugin add screen-capture

screencapture.Prevent(ctx)
defer screencapture.Allow(ctx)

Android blocks both. iOS can't block a screenshot: it covers the screen during a recording, and Watch tells you when a screenshot was taken.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Allow

func Allow(ctx context.Context) error

Allow stops protecting them.

func Prevent

func Prevent(ctx context.Context) error

Prevent starts protecting every screen, until Allow.

func Watch

func Watch(ctx context.Context, f func()) error

Watch calls f each time a screenshot is taken of your app, until ctx ends. It blocks, so run it from a goroutine in an effect. Android needs version 14 or later, and fails with plugin.Unavailable before that.

Types

This section is empty.

Jump to

Keyboard shortcuts

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