screen_capture_kit 0.0.4 copy "screen_capture_kit: ^0.0.4" to clipboard
screen_capture_kit: ^0.0.4 copied to clipboard

Native Dart bindings for macOS ScreenCaptureKit using Dart Build Hooks.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased #

0.0.4 - 2026-03-20 #

Changed #

  • Breaking type updates: stream configuration and stream APIs now use FrameRate (1..120) and QueueDepth (1..8) value objects instead of raw int for frameRate/queueDepth; invalid values throw ArgumentError.
  • Breaking API naming updates: stream output dimension parameter names were renamed from outputSize to frameSize across captureScreenshot, startCaptureStream, startCaptureStreamWithUpdater, and StreamConfiguration.

0.0.3 - 2026-03-19 #

Removed #

  • ScreenCaptureKitPort and ScreenCaptureKitImpl: the public entry type is ScreenCaptureKit only. Tests may use implements ScreenCaptureKit or a mocking package (see class documentation).
  • ContentFilterHandle: use FilterId directly for captureScreenshot, stream APIs, and releaseFilter.

Changed #

  • Domain layout: entities/, value_objects/ (geometry/, identifiers/, capture/), and errors/; shareable-content types and capture configuration types (ContentFilter, StreamConfiguration, picker types, etc.) are grouped under domain value objects where appropriate.
  • Breaking type updates: entities use DisplayId, WindowId, ProcessId, FrameSize, and PixelRect instead of raw primitives; CapturedFrame and CapturedImage expose FrameSize for dimensions.
  • Capture output sizing API updates: captureScreenshot, startCaptureStream, and startCaptureStreamWithUpdater take outputSize: FrameSize instead of separate width/height integers; StreamConfiguration uses outputSize for stream output dimensions.
  • FrameSize validation for capture output: for capture output requests, valid sizes are FrameSize.zero (0×0, native default) or both dimensions strictly positive; mixed 0/positive pairs throw ArgumentError.

Fixed #

  • Native bridge: safer cross-thread transfer for frame metadata (C strings) and corrected @available branching in the stream path.

0.0.2 - 2026-03-18 #

Fixed #

  • Stream SEGV on cancel: call removeStreamOutput before stopCapture so no callbacks run during teardown, preventing crash when subscription is cancelled on macOS.

Changed #

  • Layered architecture: domain, application, infrastructure, and presentation layers with ports and adapters.
  • Domain: value objects for IDs and geometry (DisplayId, WindowId, FilterId, PixelRect, FrameSize), entities with @immutable.
  • Application: ScreenCaptureKitPort interface and ScreenCaptureKitImpl implementation.
  • Infrastructure: native bridge (FFI) and stub implementations moved into infrastructure layer.
  • Presentation: configuration and DTO-like types (ContentFilter, StreamConfiguration, etc.) grouped in presentation layer.

0.0.1 - 2026-03-14 #

Added #

  • Shareable content API: getShareableContent() returning displays, applications, and windows (Display, RunningApplication, Window, ShareableContent).
  • Content filters: createWindowFilter(Window), createDisplayFilter(Display, {excludingWindows}), releaseFilter(FilterId).
  • Display and window capture: startCaptureStream() and startCaptureStreamWithUpdater() with configurable width, height, frame rate, source rect (region capture), cursor visibility, queue depth, and optional system audio (macOS 13+) and microphone (macOS 15+).
  • Runtime updates: CaptureStream.updateConfiguration(), CaptureStream.updateContentFilter() for changing stream config or filter without stopping.
  • Screenshot: captureScreenshot(FilterId, {width, height}) (macOS 14+).
  • System content-sharing picker (macOS 14+): presentContentSharingPicker({allowedModes}), ContentSharingPickerMode enum, ContentSharingPickerConfiguration, and CaptureStream.setContentSharingPickerConfiguration() for per-stream picker config.
  • Exception type: ScreenCaptureKitException with optional domain and code from native errors.
  • Stub implementation on non-macOS platforms (throws UnsupportedError).
  • Dart SDK constraint ^3.10.0 and dependency set (code_assets, ffi, hooks, meta, native_toolchain_c; mocktail, test for dev).
0
likes
0
points
328
downloads

Documentation

Documentation

Publisher

verified publisherblendthink.dev

Weekly Downloads

Native Dart bindings for macOS ScreenCaptureKit using Dart Build Hooks.

Repository (GitHub)
View/report issues

Topics

#macos #screen-capture #screenshot #ffi #screen-sharing

License

unknown (license)

Dependencies

code_assets, ffi, hooks, meta, native_toolchain_c

More

Packages that depend on screen_capture_kit