-
Notifications
You must be signed in to change notification settings - Fork 78
Dismiss video effects error when camera is off #3137
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
Changes from all commits
01f791d
83401fa
2e18194
7b5b6de
193cd42
34c03d6
6c4510c
cffd285
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 |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "prerelease", | ||
| "comment": "Dismiss video effects error when camera is off", | ||
| "packageName": "@azure/communication-react", | ||
| "email": "97124699+prabhjot-msft@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "prerelease", | ||
| "comment": "Dismiss video effects error when camera is off", | ||
| "packageName": "@azure/communication-react", | ||
| "email": "97124699+prabhjot-msft@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,6 +68,8 @@ import { getPipStyles } from '../../common/styles/ModalLocalAndRemotePIP.styles' | |
| import { useMinMaxDragPosition } from '../../common/utils'; | ||
| import { MobileChatSidePaneTabHeaderProps } from '../../common/TabHeader'; | ||
| import { CommonCallControlOptions } from '../../common/types/CommonCallControlOptions'; | ||
| /* @conditional-compile-remove(video-background-effects) */ | ||
| import { localVideoSelector } from '../../CallComposite/selectors/localVideoStreamSelector'; | ||
|
|
||
| /** | ||
| * @private | ||
|
|
@@ -218,6 +220,9 @@ export const CallArrangement = (props: CallArrangementProps): JSX.Element => { | |
|
|
||
| let errorBarProps = props.errorBarProps; | ||
|
|
||
| /* @conditional-compile-remove(video-background-effects) */ | ||
| const isCameraOn = useSelector(localVideoSelector).isAvailable; | ||
|
|
||
| /* @conditional-compile-remove(rooms) */ | ||
| // TODO: move this logic to the error bar selector once role is plumbed from the headless SDK | ||
| if (!rolePermissions.cameraButton && props.errorBarProps) { | ||
|
|
@@ -230,7 +235,7 @@ export const CallArrangement = (props: CallArrangementProps): JSX.Element => { | |
| } | ||
|
|
||
| /* @conditional-compile-remove(video-background-effects) */ | ||
| if (useIsParticularSidePaneOpen('videoeffects') && props.errorBarProps) { | ||
| if ((useIsParticularSidePaneOpen('videoeffects') || !isCameraOn) && props.errorBarProps) { | ||
|
Contributor
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. is this supposed to be !isCameraOn? I see that in videoEffectsPane.tsx line 149 new change it does what I expected.
Contributor
Author
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. Yeah, so in this scenario, if |
||
| errorBarProps = { | ||
| ...props.errorBarProps, | ||
| activeErrorMessages: props.errorBarProps.activeErrorMessages.filter((e) => e.type !== 'unableToStartVideoEffect') | ||
|
|
||
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.
We haven't used this anywhere in the codebase yet, but instead of hiding the error when the camera is off, could we clear the error in the the handler for toggleCamera using

newClearCallErrorsModifier?Honestly no idea if that works just curious if its possible.
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.
The way its currently implemented, does the error re-show when the camera is turned back on?
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.
For 1st suggestion, using
newClearCallErrorsModifier, this modifier is not actually exposed in the calling stateful layer. If we are planning to expose this modifier, it would be called in the stateful layer mostly in the call context by introducing new set errors method. We can trigger this method whenever we want to delete certain errors. I can pursue this as a separate task if we feel strongly about this approach.For 2nd question, as part of the second change for auto-dismiss(Auto-dismiss video effect errors #3160). Whenever camera is turned on, it will reset a new active effect and if the error is generated again it would be shown and otherwise no error will be shown.