Yansen 2 lat temu
rodzic
commit
031adb70c8

+ 1
- 0
src/pages/sample/home/components/VideoPlay.jsx Wyświetl plik

@@ -41,6 +41,7 @@ const VideoPlay = (props) => {
41 41
       ref={ref}
42 42
       autoPlay={false}
43 43
       src={url}
44
+      controls="controls"
44 45
       onEnded={() => {
45 46
         isVideoPlayRef.current = false;
46 47
       }}

+ 2
- 3
src/pages/sample/home/index.jsx Wyświetl plik

@@ -27,7 +27,7 @@ export default (props) => {
27 27
     height,
28 28
     overflow: 'hidden',
29 29
     width: '100%',
30
-    objectFit: 'fill',
30
+    objectFit: 'contain',
31 31
   }), [height]);
32 32
 
33 33
   useEffect(() => {
@@ -52,7 +52,6 @@ export default (props) => {
52 52
     });
53 53
     handNext();
54 54
 
55
-    
56 55
     const boxHeight = boxRef.current.offsetHeight;
57 56
     setHeight(boxHeight ? `${boxHeight}px` : '100%');
58 57
   }, []);
@@ -78,7 +77,7 @@ export default (props) => {
78 77
     <div
79 78
       onMouseEnter={onMouseEnter}
80 79
       onMouseLeave={onMouseLeave}
81
-      style={{ height, overflow: "hidden" }}
80
+      style={{ height, overflow: "hidden", background: '#081A48' }}
82 81
       ref={boxRef}
83 82
     >
84 83
       <Carousel

+ 1
- 0
vite.config.js Wyświetl plik

@@ -6,6 +6,7 @@ import vitePluginImp from 'vite-plugin-imp'
6 6
 // https://vitejs.dev/config/
7 7
 export default defineConfig({
8 8
   server: {
9
+    host: '0.0.0.0',
9 10
     proxy: {
10 11
       '/api/': {
11 12
         // 要代理的地址