-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(screenshots): Update render logic #93211
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
feat(screenshots): Update render logic #93211
Conversation
…ame-contains-screenshot
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #93211 +/- ##
==========================================
- Coverage 85.31% 82.91% -2.41%
==========================================
Files 10256 10255 -1
Lines 591639 591622 -17
Branches 22990 22986 -4
==========================================
- Hits 504768 490517 -14251
- Misses 86380 100465 +14085
- Partials 491 640 +149 |
|
||
export function WebMViewer(props: WebMViewerProps) { | ||
export function WebMViewer({controls = true, onCanPlay, ...props}: WebMViewerProps) { |
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.
Out of curiosity: Why do we limit this to WebM? Couldn't we try to display any video type?
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 must rethink these components and refactor them. Agree that we could have something like VideoViewer or something.
Contributes to #92154
This PR updates our logic for rendering screenshots, essentially removing the extension checks to match what the backend does.
There is a catch. The frontend also checks the mimytpe of the file, and based on that we can either render something or not render anything.
So the file will be rendered if the name contains "screenshot" and if it is one of the file formats we currently support. A new issue will be created where we will introduce files in newer formats, but that is for a follow-up.