import { AspectRatio } from "@/components/ui/aspect-ratio" import { usePlayerAIIntegration } from "@/features/ai-chat/hooks/use-player-ai-integration" import { useProjectSettings } from "@/features/project-settings" import { convertVideoSrc } from "@/lib/tauri-utils" import { usePlayer } from "../services/player-provider" import { PlayerAIOverlay } from "./player-ai-overlay" import { PlayerControls } from "./player-controls" /** * Компонент медиа-плеера для воспроизведения видео */ export function VideoPlayer() { const { settings: { aspectRatio }, } = useProjectSettings() const { currentVideo: video } = usePlayer() // Подключаем AI интеграцию const { isReady: aiReady } = usePlayerAIIntegration() // Вычисляем соотношение сторон для AspectRatio const aspectRatioValue = aspectRatio.value.width / aspectRatio.value.height // Вычисляем стили для контейнера видео const containerStyle = { position: "relative" as const, width: "100%", height: "100%", display: "flex", justifyContent: "center", alignItems: "center", overflow: "hidden", } if (!video?.path) { const file = { id: "no-video", path: "", name: "Нет видео", size: 0, type: "video/mp4", } return (
) } return (
) } VideoPlayer.displayName = "VideoPlayer"