File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
static/app/components/events/attachmentViewers Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import ImageViewer from 'sentry/components/events/attachmentViewers/imageViewer'
2
2
import JsonViewer from 'sentry/components/events/attachmentViewers/jsonViewer' ;
3
3
import LogFileViewer from 'sentry/components/events/attachmentViewers/logFileViewer' ;
4
4
import RRWebJsonViewer from 'sentry/components/events/attachmentViewers/rrwebJsonViewer' ;
5
+ import { WebMViewer } from 'sentry/components/events/attachmentViewers/webmViewer' ;
5
6
import type { IssueAttachment } from 'sentry/types/group' ;
6
7
7
8
export const getInlineAttachmentRenderer = (
@@ -26,6 +27,8 @@ export const getInlineAttachmentRenderer = (
26
27
case 'image/png' :
27
28
case 'image/gif' :
28
29
return ImageViewer ;
30
+ case 'video/webm' :
31
+ return WebMViewer ;
29
32
default :
30
33
return undefined ;
31
34
}
Original file line number Diff line number Diff line change
1
+ import { css } from '@emotion/react' ;
2
+
3
+ import type { ViewerProps } from 'sentry/components/events/attachmentViewers/utils' ;
4
+ import { getAttachmentUrl } from 'sentry/components/events/attachmentViewers/utils' ;
5
+ import PanelItem from 'sentry/components/panels/panelItem' ;
6
+ import { t } from 'sentry/locale' ;
7
+
8
+ interface WebMViewerProps
9
+ extends Pick < ViewerProps , 'attachment' | 'eventId' | 'orgSlug' | 'projectSlug' > { }
10
+
11
+ export function WebMViewer ( props : WebMViewerProps ) {
12
+ return (
13
+ < PanelItem >
14
+ < video
15
+ controls
16
+ css = { css `
17
+ max-width : 100% ;
18
+ ` }
19
+ >
20
+ < source src = { getAttachmentUrl ( props , true ) } type = "video/webm" />
21
+ { t ( 'Your browser does not support the video tag.' ) }
22
+ </ video >
23
+ </ PanelItem >
24
+ ) ;
25
+ }
You can’t perform that action at this time.
0 commit comments