+
Files
+
{files.map((file) => (
- onFileSelect(file)}
>
@@ -26,12 +24,12 @@ function MediaList({ files, selectedFile, onFileSelect, onDropNewFiles }) {
))}
-
+
{isDragActive ? (
-
Drop here
+
Drop here
) : (
-
Drag new files
+
Drag new files
)}
diff --git a/src/components/VideoPlayer/VideoPlayer.css b/src/components/VideoPlayer/VideoPlayer.css
new file mode 100644
index 0000000..4d1c8c0
--- /dev/null
+++ b/src/components/VideoPlayer/VideoPlayer.css
@@ -0,0 +1,40 @@
+.player {
+ position: relative;
+ width: 100%;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background: #000;
+ overflow: hidden;
+}
+
+.video {
+ width: 100%;
+ height: auto;
+ max-height: 100%;
+ display: block;
+ object-fit: contain;
+ pointer-events: none;
+}
+
+.player-error {
+ position: absolute;
+ top: 10px;
+ left: 10px;
+ background: rgba(255, 0, 0, 0.7);
+ color: white;
+ padding: 5px;
+ border-radius: 3px;
+ font-size: 12px;
+ z-index: 10;
+}
+
+.player-item{
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ pointer-events: auto;
+}
\ No newline at end of file
diff --git a/src/components/VideoPlayer.js b/src/components/VideoPlayer/VideoPlayer.js
similarity index 75%
rename from src/components/VideoPlayer.js
rename to src/components/VideoPlayer/VideoPlayer.js
index 85edf47..4ec95bf 100644
--- a/src/components/VideoPlayer.js
+++ b/src/components/VideoPlayer/VideoPlayer.js
@@ -1,4 +1,5 @@
import React, { useEffect, useRef, useState } from 'react';
+import './VideoPlayer.css';
function VideoPlayer({ children, videoFile, currentTime, videoRef, isPlaying, onSizeChanged, onSetCurrentTime }) {
const containerRef = useRef(null);
@@ -131,58 +132,15 @@ function VideoPlayer({ children, videoFile, currentTime, videoRef, isPlaying, on
}, [onSetCurrentTime, isPlaying]);
return (
-
-
+
+
+
{playbackError && (
-