Skip to content

Releases: xocialize/VirtualDisplayKit

v0.1.0 — Initial public release

16 Apr 19:52

Choose a tag to compare

Initial public release of VirtualDisplayKit.

VirtualDisplayKit is a Swift Package derived from Stengo/DeskPad (MIT-licensed), extended into a modular, reusable package with video recording, RTMP-ready streaming output, and SwiftUI/AppKit view integrations. See ATTRIBUTION.md for the full derivation breakdown.

What's included

  • VirtualDisplay — create and manage virtual displays via the private CGVirtualDisplay API
  • VirtualDisplayConfiguration — configurable resolution, refresh rate, HiDPI support, vendor/product identifiers, and preset configurations (.preset1080p, .preset1080pPortrait, .preset4K, .preset4KPortrait)
  • DisplayStreamRendererCGDisplayStream-based frame delivery with both IOSurface and CVPixelBuffer output paths
  • DisplayRecorder — record virtual display content to H.264/HEVC MP4/MOV via AVAssetWriter; .standard, .highQuality, and .hevcHighEfficiency presets
  • FrameOutputStream — emit encoded H.264/HEVC Annex-B or raw CVPixelBuffer frames for RTMP streaming, OBS integration, or custom pipelines, via VTCompressionSession; .rtmpStreaming, .highQuality, .realtime presets
  • VirtualDisplayController — high-level facade combining display, recording, and streaming
  • VirtualDisplayView (SwiftUI) and VirtualDisplayNSView (AppKit) for preview integration
  • MouseTracker — cursor position mapping between preview view and virtual display coordinate space
  • Demo app at Virtual Display.xcodeproj demonstrating all features
  • Examples for SwiftUI, AppKit, and digital signage use cases

Installation

```swift
.package(url: "https://github.com/xocialize/VirtualDisplayKit.git\", from: "0.1.0")
```

Requirements

  • macOS 13.0+
  • Swift 5.9+
  • Xcode 15.0+

Private API notice

This library uses Apple's private `CGVirtualDisplay` API. Apps using it are not suitable for App Store submission without understanding the risk of rejection. Intended for internal tools, development utilities, digital signage systems, and direct-distribution applications. See SECURITY.md.

Attribution

Built on DeskPad by Bastian Andelefski — thank you for open-sourcing the foundation.

Full changelog: CHANGELOG.md