| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- const axios = require('axios')
- const service = axios.create()
- const baseUrl = 'http://localhost:5513/'
- const timeout = 60000
- function get(config = {
- url: '',
- }) {
- return service.get(baseUrl + config.url, {
- headers: config.headers || {},
- timeout: config.timeout || timeout
- })
- }
- module.exports = {
- liveShow(){
- return get({
- url: '?CMD=LiveViewWnd_Show'
- })
- },
- liveHide(){
- return get({
- url: '?CMD=LiveViewWnd_Hide'
- })
- },
- capture(){
- return get({
- url: '?CMD=LiveView_Capture'
- })
- },
- setParams(params){
- return get({
- url: `?slc=set¶m1=${params.key}¶m2=${params.value}`
- })
- },
- }
- /*
- *
- * 设置 iso
- * 光圈 aperture
- * 拍摄模式 mode
- * 快门速度 shutterSpeed
- * 白平衡 whitebalance
- * 曝光补偿 ExposureCompensation
- * 对焦模式 focusmode
- *
- *
- 曝光度:exposure
- 压缩:compression
- 测光点:metering
- * */
|