- From: Jeffrey Yasskin <notifications@github.com>
- Date: Mon, 11 Jul 2016 09:20:02 -0700
- To: w3c/permissions <permissions@noreply.github.com>
- Cc:
Received on Monday, 11 July 2016 16:22:05 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)
You don't need the ()s around `err` here. Do we want to be consistent about being completely minimal, or do we not care?
---
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#r70289387
Received on Monday, 11 July 2016 16:22:05 UTC