diff --git a/frontend/src/pages/Search.css b/frontend/src/pages/Search.css
index 5a88fa4..44e766b 100644
--- a/frontend/src/pages/Search.css
+++ b/frontend/src/pages/Search.css
@@ -347,6 +347,13 @@
pointer-events: none;
}
+.viewer-content video {
+ max-width: 100%;
+ max-height: 100%;
+ object-fit: contain;
+ background: black;
+}
+
.swipe-hint {
position: absolute;
bottom: 20px;
diff --git a/frontend/src/pages/Search.jsx b/frontend/src/pages/Search.jsx
index 682c578..1246483 100644
--- a/frontend/src/pages/Search.jsx
+++ b/frontend/src/pages/Search.jsx
@@ -22,6 +22,12 @@ export default function Search({ user }) {
const touchStartX = useRef(0)
const touchEndX = useRef(0)
+const isVideoUrl = (url = '') => {
+ if (!url) return false
+ const clean = url.split('?')[0].toLowerCase()
+ return clean.endsWith('.mp4') || clean.endsWith('.webm') || clean.endsWith('.mov') || clean.endsWith('.m4v')
+}
+
useEffect(() => {
if (query.length > 1) {
loadTagSuggestions()
@@ -476,11 +482,24 @@ export default function Search({ user }) {
onTouchMove={handleTouchMove}
onTouchEnd={handleTouchEnd}
>
-
+ {isVideoUrl(results[currentIndex].url) ? (
+
+ ) : (
+
+ )}
{/* Индикатор свайпа */}