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
29a62763
Unverified
Commit
29a62763
authored
2 years ago
by
Yash Rajpal
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[IMPROVE] Rounded video attachment (#26832)
parent
5474569f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/meteor/client/components/message/Attachments/Files/VideoAttachment.tsx
+10
-1
10 additions, 1 deletion
.../components/message/Attachments/Files/VideoAttachment.tsx
with
10 additions
and
1 deletion
apps/meteor/client/components/message/Attachments/Files/VideoAttachment.tsx
+
10
−
1
View file @
29a62763
import
{
VideoAttachmentProps
}
from
'
@rocket.chat/core-typings
'
;
import
{
css
}
from
'
@rocket.chat/css-in-js
'
;
import
{
Box
}
from
'
@rocket.chat/fuselage
'
;
import
colors
from
'
@rocket.chat/fuselage-tokens/colors
'
;
import
{
useMediaUrl
}
from
'
@rocket.chat/ui-contexts
'
;
import
React
,
{
FC
}
from
'
react
'
;
...
...
@@ -13,6 +15,13 @@ import AttachmentSize from '../Attachment/AttachmentSize';
import
AttachmentTitle
from
'
../Attachment/AttachmentTitle
'
;
import
{
useCollapse
}
from
'
../hooks/useCollapse
'
;
const
videoAttachmentCss
=
css
`
border: 2px solid
${
colors
.
n200
}
!important;
border-radius: 2px;
display: flex;
flex-direction: column;
`
;
export
const
VideoAttachment
:
FC
<
VideoAttachmentProps
>
=
({
title
,
video_url
:
url
,
...
...
@@ -35,7 +44,7 @@ export const VideoAttachment: FC<VideoAttachmentProps> = ({
{
hasDownload
&&
link
&&
<
AttachmentDownload
title
=
{
title
}
href
=
{
getURL
(
link
)
}
/>
}
</
AttachmentRow
>
{
!
collapsed
&&
(
<
AttachmentContent
width
=
'full'
>
<
AttachmentContent
width
=
'full'
className
=
{
videoAttachmentCss
}
>
<
Box
is
=
'video'
width
=
'full'
controls
preload
=
'metadata'
>
<
source
src
=
{
getURL
(
url
)
}
type
=
{
type
}
/>
</
Box
>
...
...
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