node-sonycam
![npm version](https://img.shields.io/npm/v/node-sonycam)
node-sonycam is a Node.js library to fetch images from Sony DSLRs (e.g., ILCE-QX1) written in TypeScript.
node-sonycam はソニー製デジタル一眼から画像を取得するための Node.js 用ライブラリで、 TypeScript で記述されています。
Usage / 使い方
const location = await discoverSonyDevice();
console.log("Discovered service spec location:", location);
const spec = await fetchSonyCamSpec(location);
const serviceUrl = findSonyCamUrl(spec);
console.log("Found Sony camera service url:", serviceUrl);
const sonyCam = new SonyCam(serviceUrl);
await sonyCam.connect();
const liveviewUrl = await sonyCam.startLiveview();
await sonyCam.fetchLiveview();
console.log("Liveview URL:", liveviewUrl);
sonyCam.addListener("image", imageListener);
await new Promise((r) => setTimeout(r, 10 * 1000));
sonyCam.removeListener("image", imageListener);
await sonyCam.stopLiveview();
await sonyCam.disconnect();
More examples can be found in the following repositories.
実例は以下のリポジトリで見つけられます。
API Documentation / API ドキュメント
All of the exported classes and interfaces are listed in TypeDoc.
このモジュールが export しているすべてのクラスとインタフェースは TypeDoc で閲覧できます。
Credits / 開発者
Copyright (c) 2022 Jun Kato. Released under the MIT license.