Parcourir la source

视频组件调整

Hwf il y a 4 mois
Parent
commit
8767977580
2 fichiers modifiés avec 23 ajouts et 20 suppressions
  1. 9 6
      src/components/HKVideo/hikvision-h5player.vue
  2. 14 14
      src/components/HKVideo/index.vue

+ 9 - 6
src/components/HKVideo/hikvision-h5player.vue

@@ -208,12 +208,15 @@ const handleScreenshot = (name) => {
   a.download = fileName;
   a.click();
 };
-
+const getPlayer = () => {
+  return state.player;
+};
 defineExpose({
   play,
   stop,
   playback,
-  handleScreenshot
+  handleScreenshot,
+  getPlayer
 });
 </script>
 
@@ -230,11 +233,11 @@ defineExpose({
     height: 100%;
   }
   .video-enlarge {
-    width: 34px;
-    height: 34px;
+    width: 14px;
+    height: 14px;
     position: absolute;
-    top: 20px;
-    right: 20px;
+    top: 10px;
+    right: 10px;
     z-index: 10;
   }
 

+ 14 - 14
src/components/HKVideo/index.vue

@@ -121,10 +121,14 @@ const stop_now = async () => {
 const handleScreenshot = (name) => {
   videoPlayer.value.handleScreenshot(name);
 };
+const getPlayer = (name) => {
+  return videoPlayer.value.getPlayer(name);
+};
 defineExpose({
   play,
   refresh_data,
-  handleScreenshot
+  handleScreenshot,
+  getPlayer
 });
 onMounted(() => {
   if (!!props.autoplay) {
@@ -156,8 +160,8 @@ onMounted(() => {
     cursor: pointer;
   }
   .video-play {
-    width: 72px;
-    height: 72px;
+    width: 25px;
+    height: 25px;
     position: absolute;
     top: 50%;
     left: 50%;
@@ -175,16 +179,13 @@ onMounted(() => {
     height: 100%;
 
     .err_box {
-      display: inline-flex;
+      display: flex;
       justify-content: center;
       align-items: center;
       width: 100%;
       height: 100%;
 
       .err_inner_box {
-        width: 150px;
-        height: 120px;
-
         display: flex;
         flex-direction: column;
         justify-content: space-between;
@@ -194,22 +195,21 @@ onMounted(() => {
         align-items: center;
 
         .err_icon {
-          width: 39px;
-          height: 40px;
+          width: 18px;
+          height: 20px;
           background: url('@/assets/images/video/err_video.png') no-repeat;
           background-size: 100% 100%;
-          margin-bottom: 10px;
         }
 
         .err_text {
           font-size: 14px;
           color: #ffffffb3;
-          margin-bottom: 10px;
+          margin-bottom: 4px;
         }
 
         .refresh_btn {
-          width: 120px;
-          height: 30px;
+          width: 70px;
+          height: 25px;
           border: 1px solid #001b41;
           background: #006affcc;
           cursor: pointer;
@@ -219,7 +219,7 @@ onMounted(() => {
           font-size: 14px;
           font-style: normal;
           font-weight: 400;
-          line-height: 30px;
+          line-height: 25px;
         }
       }
     }