Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
72a34a02
Unverified
Commit
72a34a02
authored
1 year ago
by
gabriellsh
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
fix(meteor): Close video recorder if permission denied (#30054)
parent
df64d55f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.changeset/witty-feet-warn.md
+5
-0
5 additions, 0 deletions
.changeset/witty-feet-warn.md
apps/meteor/client/views/composer/VideoMessageRecorder/VideoMessageRecorder.tsx
+5
-4
5 additions, 4 deletions
...ws/composer/VideoMessageRecorder/VideoMessageRecorder.tsx
with
10 additions
and
4 deletions
.changeset/witty-feet-warn.md
0 → 100644
+
5
−
0
View file @
72a34a02
---
"
@rocket.chat/meteor"
:
patch
---
fixed the video recorder window not closing after permission is denied.
This diff is collapsed.
Click to expand it.
apps/meteor/client/views/composer/VideoMessageRecorder/VideoMessageRecorder.tsx
+
5
−
4
View file @
72a34a02
import
type
{
IMessage
,
IRoom
}
from
'
@rocket.chat/core-typings
'
;
import
{
css
}
from
'
@rocket.chat/css-in-js
'
;
import
{
Box
,
ButtonGroup
,
Button
,
Icon
,
PositionAnimated
}
from
'
@rocket.chat/fuselage
'
;
import
{
useMutableCallback
}
from
'
@rocket.chat/fuselage-hooks
'
;
import
{
useTranslation
,
useToastMessageDispatch
}
from
'
@rocket.chat/ui-contexts
'
;
import
type
{
AllHTMLAttributes
,
RefObject
}
from
'
react
'
;
import
React
,
{
useRef
,
useEffect
,
useState
}
from
'
react
'
;
...
...
@@ -94,24 +95,24 @@ const VideoMessageRecorder = ({ rid, tmid, chatContext, reference }: VideoMessag
stopVideoRecording
(
rid
,
tmid
);
};
const
handleCancel
=
()
=>
{
const
handleCancel
=
useMutableCallback
(
()
=>
{
VideoRecorder
.
stop
();
chat
?.
composer
?.
setRecordingVideo
(
false
);
setTime
(
undefined
);
stopVideoRecording
(
rid
,
tmid
);
};
}
)
;
useEffect
(()
=>
{
if
(
!
VideoRecorder
.
getSupportedMimeTypes
())
{
return
dispatchToastMessage
({
type
:
'
error
'
,
message
:
t
(
'
Browser_does_not_support_recording_video
'
)
});
}
VideoRecorder
.
start
(
videoRef
.
current
??
undefined
);
VideoRecorder
.
start
(
videoRef
.
current
??
undefined
,
(
success
)
=>
(
!
success
?
handleCancel
()
:
undefined
)
);
return
()
=>
{
VideoRecorder
.
stop
();
};
},
[
dispatchToastMessage
,
t
]);
},
[
dispatchToastMessage
,
handleCancel
,
t
]);
return
(
<
PositionAnimated
visible
=
'visible'
anchor
=
{
reference
}
placement
=
'top-end'
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment