小编Jas*_*eda的帖子

如何在 OSX 中使用 AVFoundation 手动控制曝光时间?

我正在使用 AVFoundation 从连接的相机捕获图像。我需要能够手动控制曝光,而不是自动控制。

我找到了 AVCaptureDevice.exposureMode ( https://developer.apple.com/documentation/avfoundation/avcapturedevice/1388858-exposuremode ),它允许我将模式设置为锁定或自定义,但相关的 iso 和 ExposureDuration 属性是 iOS只要。

有没有办法控制 OSX 中 AVFoundation 的曝光时间?或者甚至使用另一个框架?

macos avfoundation avcapture avcapturedevice

6
推荐指数
0
解决办法
262
查看次数

Aurelia:绑定自定义元素的textContent?

我正在Aurelia写一个非常简单的数据网格自定义元素,部分用于我需要的功能,部分用于学习Aurelia.它进展顺利,但我仍然坚持如何获取自定义组件中元素的内容.

这是我的代码,问题的其余部分如下:

数据grid.js

import {inject, bindable} from 'aurelia-framework';
import _ from 'underscore';

export class DataGridCustomElement {
  @bindable data = [];
  @bindable height = '';

  columns = [];

  bind() {
    this.sort(this.columns[0].property);
  }

  sort(property) {
    if (property == this.sortProperty) {
      this.sortDirection = !this.sortDirection;
    }
    else {
      this.sortProperty = property;
      this.sortDirection = true;
    }
    let data = _.sortBy(this.data, this.sortProperty);
    if (!this.sortDirection) {
      data = data.reverse()
    }
    this.data = data;
  }
}

@inject(DataGridCustomElement)
export class DataGridColumnCustomElement {
  @bindable title = '';
  @bindable width = …
Run Code Online (Sandbox Code Playgroud)

javascript aurelia aurelia-binding

4
推荐指数
1
解决办法
1035
查看次数