Refactor media preview functionality and update localization strings
ci / build-backend (push) Successful in 1m23s
ci / build-frontend (push) Successful in 39s
ci / tests (push) Successful in 1m22s
ci / sonar (push) Successful in 3m43s

Moved the mediaPreviewUrl function to the media API for better organization and clarity. Updated the MediaPanel component to include a preview feature for media assets, allowing users to view processed clips. Enhanced the UI to include a dialog for media previews and added corresponding localization strings in both English and Russian for the new preview functionality.
This commit is contained in:
Leonid Pershin
2026-07-30 23:24:35 +03:00
parent b9d96c915c
commit bee655ec1c
6 changed files with 50 additions and 12 deletions
@@ -16,7 +16,8 @@ import { HlsVideo } from '@/shared/ui/hls-video'
import { Input } from '@/shared/ui/input'
import { BlockBuilder } from './BlockBuilder'
import { ClipGroupPanel } from './ClipGroupPanel'
import { listInterstitialBlocks, listInterstitials, mediaPreviewUrl } from './api'
import { mediaPreviewUrl } from '@/features/admin/media/api'
import { listInterstitialBlocks, listInterstitials } from './api'
import { setDragItem } from './dnd'
import { formatClock } from './format'
@@ -16,8 +16,3 @@ export function importInterstitials(mediaAssetIds: string[]) {
body: { mediaAssetIds },
})
}
/** Плейлист обработанного ассета под admin-роутом (JWT) — грузится через hls.js. */
export function mediaPreviewUrl(assetId: string) {
return `/api/admin/media/${assetId}/preview/index.m3u8`
}