Skip to content

Commit 21d9e10

Browse files
authored
Fix typo and formatting
1 parent e4c7dc7 commit 21d9e10

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,14 @@ This section describes the basic inputs/outputs of the component. All inputs are
8383

8484
## Good To Know
8585
### How to determine if the user denied camera access
86-
When camera initialization fails for some reason, the component emits a `WebcamInitError` via the `initError` EventEmitter. If provided by the browser, this object contains a field `mediaStreamError: MediaStreamError` which contains information about why UserMedia initialization failed. According to [Mozilla API docs](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia), this object contains a `name` attribute with gives insight about the reason.
86+
When camera initialization fails for some reason, the component emits a `WebcamInitError` via the `initError` EventEmitter. If provided by the browser, this object contains a field `mediaStreamError: MediaStreamError` which contains information about why UserMedia initialization failed. According to [Mozilla API docs](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia), this object contains a `name` attribute which gives insight about the reason.
8787
> If the user denies permission, or matching media is not available, then the promise is rejected with NotAllowedError or NotFoundError respectively.
8888
8989
In case a user denied permissions this can be determined like this:
9090
```
9191
<webcam (initError)="handleInitError($event)"></webcam>
92-
93-
---
94-
92+
```
93+
```
9594
public handleInitError(error: WebcamInitError): void {
9695
if (error.mediaStreamError && error.mediaStreamError.name === "NotAllowedError") {
9796
console.warn("Camera access was not allowed by user!");

0 commit comments

Comments
 (0)