screen_capture_kit 0.0.4
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) andQueueDepth(1..8) value objects instead of rawintforframeRate/queueDepth; invalid values throwArgumentError. - Breaking API naming updates: stream output dimension parameter names were renamed from
outputSizetoframeSizeacrosscaptureScreenshot,startCaptureStream,startCaptureStreamWithUpdater, andStreamConfiguration.
0.0.3 - 2026-03-19 #
Removed #
ScreenCaptureKitPortandScreenCaptureKitImpl: the public entry type isScreenCaptureKitonly. Tests may useimplements ScreenCaptureKitor a mocking package (see class documentation).ContentFilterHandle: useFilterIddirectly forcaptureScreenshot, stream APIs, andreleaseFilter.
Changed #
- Domain layout:
entities/,value_objects/(geometry/,identifiers/,capture/), anderrors/; 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, andPixelRectinstead of raw primitives;CapturedFrameandCapturedImageexposeFrameSizefor dimensions. - Capture output sizing API updates:
captureScreenshot,startCaptureStream, andstartCaptureStreamWithUpdatertakeoutputSize: FrameSizeinstead of separatewidth/heightintegers;StreamConfigurationusesoutputSizefor 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; mixed0/positive pairs throwArgumentError.
Fixed #
- Native bridge: safer cross-thread transfer for frame metadata (C strings) and corrected
@availablebranching in the stream path.
0.0.2 - 2026-03-18 #
Fixed #
- Stream SEGV on cancel: call
removeStreamOutputbeforestopCaptureso 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:
ScreenCaptureKitPortinterface andScreenCaptureKitImplimplementation. - 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()andstartCaptureStreamWithUpdater()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}),ContentSharingPickerModeenum,ContentSharingPickerConfiguration, andCaptureStream.setContentSharingPickerConfiguration()for per-stream picker config. - Exception type:
ScreenCaptureKitExceptionwith optional domain and code from native errors. - Stub implementation on non-macOS platforms (throws
UnsupportedError). - Dart SDK constraint
^3.10.0and dependency set (code_assets, ffi, hooks, meta, native_toolchain_c; mocktail, test for dev).