node-sonycam
v0.0.6
Published
Node.js library to fetch images from Sony DSLRs (e.g., ILCE-QX1) written in TypeScript
Downloads
6
Readme
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 で記述されています。
- npm package: https://www.npmjs.com/package/node-sonycam
- API document: https://arcatdmz.github.io/node-sonycam/
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.
実例は以下のリポジトリで見つけられます。
- https://github.com/arcatdmz/node-sonycam-example-socketio
- https://github.com/arcatdmz/node-sonycam-example-ffmpeg
API Documentation / API ドキュメント
All of the exported classes and interfaces are listed in TypeDoc.
このモジュールが export しているすべてのクラスとインタフェースは TypeDoc で閲覧できます。
Credits / 開発者
- Jun Kato
- Elijah Parker (/timelapseplus/node-sony-camera, 2017)
- Ikuo Terado (/eqot/RemoteCamera, 2013-2014)
Copyright (c) 2022 Jun Kato. Released under the MIT license.