node-sonycam is a Node.js library to fetch images from Sony DSLRs (e.g., ILCE-QX1) using Camera Remote API beta written in TypeScript.
node-sonycam は Camera Remote API beta を利用してソニー製デジタル一眼レフカメラから画像を取得するための Node.js 用ライブラリで、 TypeScript で記述されています。
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.
実例は以下のリポジトリで見つけられます。
All of the exported classes and interfaces are listed in TypeDoc.
このモジュールが export しているすべてのクラスとインタフェースは TypeDoc で閲覧できます。
Copyright (c) 2022 Jun Kato. Released under the MIT license.
Generated using TypeDoc