Skip to content

Commit

Permalink
Added {pan: 1} example
Browse files Browse the repository at this point in the history
  • Loading branch information
beaufortfrancois authored Jun 16, 2020
1 parent 1441601 commit 9ab6635
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ptz-explainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,19 @@ if ("tilt" in capabilities) {
}
```

The example below shows how camera pan could be reset when acquiring a
PTZ camera in `getUserMedia()`.

```js
// User is prompted to grant both camera and PTZ access in a single call.
// If the camera does not support PTZ or user denies PTZ permission, it fails
// as PTZ constraints are required.
const videoStream = await navigator.mediaDevices.getUserMedia({
// [NEW] Website asks to reset camera pan.
video: { pan: 1 },
});
```

[Spec PR](https://github.com/w3c/mediacapture-image/pull/218)

## Integration with the Permissions API
Expand Down

0 comments on commit 9ab6635

Please sign in to comment.