Refactor media preview functionality and update localization strings
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:
@@ -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`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user