- From: François Beaufort via GitHub <sysbot+gh@w3.org>
- Date: Wed, 05 Oct 2016 10:04:51 +0000
- To: public-media-capture@w3.org
beaufortfrancois has just created a new issue for
https://github.com/w3c/mediacapture-image:
== Rename takePhoto to capture ==
The Image Capture API is really about capturing images and I think the
`takePhoto` method name could be improved and simply renamed to
`capture`.
```js
new ImageCapture(track).capture().then(blob => {
document.querySelector('img').src = URL.createObjectURL(blob);
});
```
```diff
[Constructor(MediaStreamTrack track)]
interface ImageCapture {
readonly attribute MediaStreamTrack videoStreamTrack;
readonly attribute MediaStream previewStream;
Promise<PhotoCapabilities> getPhotoCapabilities();
Promise<void> setOptions(PhotoSettings?
photoSettings);
- Promise<Blob> takePhoto(PhotoSettings?
photoSettings);
+ Promise<Blob> capture(PhotoSettings? photoSettings);
Promise<ImageBitmap> grabFrame();
};
Please view or discuss this issue at
https://github.com/w3c/mediacapture-image/issues/88 using your GitHub
account
Received on Wednesday, 5 October 2016 10:05:01 UTC