- From: Marcos Cáceres <notifications@github.com>
- Date: Mon, 11 Jul 2016 20:03:50 -0700
- To: w3c/permissions <permissions@noreply.github.com>
- Cc:
Received on Tuesday, 12 July 2016 03:04:56 UTC
> + devices => devices.filter(({ kind }) => kind === "videoinput")
> + )
> + // get the deviceId of first camera, create query object
> + .then(
> + ([{ deviceId }]) => ({ name: "camera", deviceId })
> + )
> + // perform query
> + .then(
> + queryObj => navigator.permissions.query(queryObj)
> + )
> + // log the state
> + .then(
> + ({ state }) => console.log("Permission state of first camera is", state)
> + )
> + .catch(
> + (err) => console.error(err.stack)
Let's go with minimal... no convention has really emerged yet, AFAIK, regarding these shorthands... but omitting optional bits sounds good unless they are actually needed.
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/permissions/pull/101/files/470ed130ca7c83f19116181ac87726635a43802b#r70371170
Received on Tuesday, 12 July 2016 03:04:56 UTC