Skip to content

Commit

Permalink
Add docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasIO committed Nov 21, 2023
1 parent fc8db9e commit b5e4783
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/react/src/hooks/useMediaDeviceSelect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ export interface UseMediaDeviceSelectProps {
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices | MDN enumerateDevices}
*/
requestPermissions?: boolean;
/**
* this callback gets called if an error is thrown when failing to select a device and also if a user
* denied permissions, eventhough the `requestPermissions` option is set to `true`.
* Most commonly this will emit a MediaDeviceError
*/
onError?: (e: Error) => void;
}

Expand Down

0 comments on commit b5e4783

Please sign in to comment.