-
Notifications
You must be signed in to change notification settings - Fork 12
Feat(plugin): Add set camera focus as ui-command #168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v0.0.x
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -1,5 +1,5 @@ | ||||||||
| import { CameraEnum } from './enums'; | ||||||||
| import { SetSelfViewDisableAllDevicesCommandArguments, SetSelfViewDisableCommandArguments } from './types'; | ||||||||
| import { SetCameraFocusCommandArguments, SetSelfViewDisableAllDevicesCommandArguments, SetSelfViewDisableCommandArguments } from './types'; | ||||||||
|
|
||||||||
| export const camera = { | ||||||||
| /** | ||||||||
|
|
@@ -49,4 +49,29 @@ | |||||||
| }), | ||||||||
| ); | ||||||||
| }, | ||||||||
| /** | ||||||||
| * Sets the in focus camera for a specific user. | ||||||||
| * | ||||||||
| * @param setSelfViewDisableCommandArguments: object with a | ||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Parameter name is slightly off. |
||||||||
| * boolean that tells whether to enable or disable the camera focus for specific user. | ||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
| */ | ||||||||
| setCameraFocus: ( | ||||||||
| setCameraFocusCommandArguments: SetCameraFocusCommandArguments, | ||||||||
| ) => { | ||||||||
| const { | ||||||||
| webcamSelector, | ||||||||
| focus, | ||||||||
| } = setCameraFocusCommandArguments; | ||||||||
| window.dispatchEvent( | ||||||||
| new CustomEvent< | ||||||||
| SetCameraFocusCommandArguments | ||||||||
| >(CameraEnum.SET_CAMERA_FOCUS, { | ||||||||
| detail: { | ||||||||
| focus, | ||||||||
| webcamSelector, | ||||||||
| }, | ||||||||
| }), | ||||||||
| ); | ||||||||
| } | ||||||||
| , | ||||||||
|
Comment on lines
+75
to
+76
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Adjusting typescipt error. |
||||||||
| }; | ||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| export enum CameraEnum { | ||
| SET_SELF_VIEW_DISABLED_ALL_DEVICES = 'SET_SELF_VIEW_DISABLED_ALL_DEVICES_COMMAND', | ||
| SET_SELF_VIEW_DISABLED = 'SET_SELF_VIEW_DISABLED_COMMAND', | ||
| SET_CAMERA_FOCUS = 'SET_CAMERA_FOCUS_COMMAND', | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.