@indutny/mac-screen-share
TypeScript icon, indicating that this package has built-in type declarations

1.0.13 • Public • Published

@indutny/mac-screen-share

npm

Bindings for macOS ScreenCaptureKit.

Installation

npm install @indutny/mac-screen-share

Usage

import { Stream } from '@indutny/mac-screen-share';

const stream = new Stream({
  width: 1024,
  height: 768,
  frameRate: 10,

  onStart() {},
  onStop(error) {},
  onFrame(frame, width, height, timestamp) {
    // Frame is in Nv12 encoding
    // timestamp is in seconds (not a unix epoch time)
  },
});

// Later
stream.stop();

LICENSE

This software is licensed under the MIT License.

Package Sidebar

Install

npm i @indutny/mac-screen-share

Weekly Downloads

466

Version

1.0.13

License

MIT

Unpacked Size

24.3 kB

Total Files

8

Last publish

Collaborators

  • indutny